Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class CheckBox

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


class CheckBox
extends LabelWrapper

A simple check box for setting true/false values

Events:

click - Fired whenever the user presses and releases the mouse button while on the checkbox, changing its state.
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
clickHandler: 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
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
label: String (write)
Sets the text to be shown on the check box.

public
label: String (read)
Gets the text shown on the check box.

public
selected: Boolean (write)
True if the check box is currently in a "checked" state. Can also be used to set the check box's state to down.

public
selected: Boolean (read)
Gets the current state of the check box.

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
CheckBox ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): CheckBox
Static method used to create an instance of a CheckBox 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

clickHandler

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

Usage:
myCheckBox.clickHandler = function(){
trace("I was clicked.");
}

focusHandler

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

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

killFocusHandler

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

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

removeEventListener

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

tabFocusHandler

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

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


Property Documentation

label

public label: String (write)
Sets the text to be shown on the check box.

Example:
myCheckBox.label = "Remember me";

label

public label: String (read)
Gets the text shown on the check box.

Example:
myVar = myCheckBox.label;

selected

public selected: Boolean (write)
True if the check box is currently in a "checked" state. Can also be used to set the check box's state to down.

Example:
myCheckBox.selected = true;

selected

public selected: Boolean (read)
Gets the current state of the check box.

Example:
myVar = myCheckBox.selected;


Constructor Documentation

CheckBox

public function CheckBox(Void)

Method Documentation

create

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

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

Example:
import com.bjc.controls.CheckBox;
var newCheckBox:CheckBox = CheckBox.create(_root, "myCheckBox", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com