Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class Window

MovieClip
  |
  +--com.bjc.core.BJCComponent
        |
        +--com.bjc.core.LabelWrapper
              |
              +--com.bjc.controls.Window


class Window
extends LabelWrapper

Window component.

Events:

close - Fired when the user clicks the close button on the window, just prior to the component being removed.
size - Fired whenever the user manually changes the size of the window by dragging the lower right corner.
focus - Fired whenever the component receives focus.
killFocus - Fired whenever the component loses focus.
tabFocus - Fired whenever the component receives focus by pressing the TAB key.


Author:
Flashloaded - www.flashloaded.com


Field Summary

public
addEventListener: Function
See the EventDispatcher Class in Flash Help

public
closeHandler: Function
Can be used to assign a direct event handler to the component instance.

public
focusHandler: Function
Can be used to assign a direct event handler to the component instance.

public
killFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

public
removeEventListener: Function
See the EventDispatcher Class in Flash Help

public
sizeHandler: Function
Can be used to assign a direct event handler to the component instance.

public
tabFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
closeable: Boolean (write)
Sets the closable mode of the component. If true, a button will appear on the window allowing it to be closed.

public
closeable: Boolean (read)
Gets the closable mode of the component.

public
content: MovieClip (read-only)
Returns a reference to the content attached into the window.

public
contentPath: String (write)
Sets the linkage name of an exported symbol in the library. This will be attached inside the window.

public
contentPath: String (read)
Gets the linkage name of the content symbol.

public
draggable: Boolean (write)
Determines if the window can be dragged by clicking on the title bar.

public
draggable: Boolean (read)
Gets the the draggable mode of the component.

public
removeOnClose: Boolean (write)
Sets the removeOnClose mode of the component. If true, the component will be removed when the user clicks the close button in the upper right corner. If false, the window will only broadcast a "close" event and it is up to you to handle that event and implement whatever behavior you want.

public
removeOnClose: Boolean (read)
Gets the removeOnClose mode of the component.

public
resizable: Boolean (write)
Sets the resizable mode of the component. If true, handles will appear in the lower right corner of the window allowing the user to resize the window with the mouse.

public
resizable: Boolean (read)
Gets the resizable mode of the component.

public
title: String (write)
Sets the text to show in the title bar of the window.

public
title: String (read)
Gets the text showed in the title bar of the window.

Properties inherited from class com.bjc.core.LabelWrapper

align, disabledColor, disableStyles, embedFont, fontColor, fontFace, fontSize, html

Properties inherited from class com.bjc.core.BJCComponent

disabledAlpha, enabled, focusTime, height, keyEnabled, style, width

Constructor

public
Window ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): Window
Static method used to create an instance of a Window on stage at run time.

Methods inherited from class com.bjc.core.BJCComponent

draw, invalidate, move, remove, setSize



Field Documentation

addEventListener

public var addEventListener: Function
See the EventDispatcher Class in Flash Help

closeHandler

public var closeHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myWindow.closeHandler = function(){
trace("I am about to close.");
}

focusHandler

public var focusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myWindow.focusHandler = function(){
trace("Set focus.");
}

killFocusHandler

public var killFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myWindow.killFocusHandler = function(){
trace("Kill focus.");
}

removeEventListener

public var removeEventListener: Function
See the EventDispatcher Class in Flash Help

sizeHandler

public var sizeHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myWindow.sizeHandler = function(){
trace("I am bigger or smaller.");
}

tabFocusHandler

public var tabFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myWindow.tabFocusHandler = function(){
trace("Tab focus.");
}


Property Documentation

closeable

public closeable: Boolean (write)
Sets the closable mode of the component. If true, a button will appear on the window allowing it to be closed.

Example:
myWindow.closeable = true;

closeable

public closeable: Boolean (read)
Gets the closable mode of the component.

Example:
myVar = myWindow.closeable;

content

public content: MovieClip (read-only)
Returns a reference to the content attached into the window.

Example:
myWindow.content.attachMovie("someAdditionalContent", "stuff", 0);

contentPath

public contentPath: String (write)
Sets the linkage name of an exported symbol in the library. This will be attached inside the window.

Example:
myWindow.contentPath = "responseForm";

contentPath

public contentPath: String (read)
Gets the linkage name of the content symbol.

Example:
myVar = myWindow.contentPath;

draggable

public draggable: Boolean (write)
Determines if the window can be dragged by clicking on the title bar.

Example:
myWindow.draggable = false;

draggable

public draggable: Boolean (read)
Gets the the draggable mode of the component.

Example:
myVar = myWindow.draggable;

removeOnClose

public removeOnClose: Boolean (write)
Sets the removeOnClose mode of the component. If true, the component will be removed when the user clicks the close button in the upper right corner. If false, the window will only broadcast a "close" event and it is up to you to handle that event and implement whatever behavior you want.

Example:
myWindow.removeOnClose = false;
myWindow.closeHandler = function(){
	this._visible = false;
}

removeOnClose

public removeOnClose: Boolean (read)
Gets the removeOnClose mode of the component.

Example:
myVar = myWindow.removeOnClose;

resizable

public resizable: Boolean (write)
Sets the resizable mode of the component. If true, handles will appear in the lower right corner of the window allowing the user to resize the window with the mouse.

Example:
myWindow.resizable = true;

resizable

public resizable: Boolean (read)
Gets the resizable mode of the component.

Example:
myVar = myWindow.resizable;

title

public title: String (write)
Sets the text to show in the title bar of the window.

Example:
myWindow.text = "Response Form";

title

public title: String (read)
Gets the text showed in the title bar of the window.

Example:
myVar = myWindow.text;


Constructor Documentation

Window

public function Window(Void)

Method Documentation

create

public static function create(target: MovieClip,
 id: String,
 depth: Number,
 initObj: Object): Window
Static method used to create an instance of a Window on stage at run time.

Parameters:
target
the movie clip to which the window will be attached.
id
the instance name given to the new window attached.
depth
the depth at which to attach the new window.
initObj
(optional) an object containing any properties you want to assign to the component when it is created
Returns:
a reference to the new window attached.

Example:
import com.bjc.controls.Window;
var newWindow:Window = Window.create(_root, "myWindow", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com