Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class IconButton

MovieClip
  |
  +--com.bjc.core.BJCComponent
        |
        +--com.bjc.controls.IconButton


class IconButton
extends BJCComponent

A button component with icon

Events:

click - Fired whenever the user presses and releases the mouse on the button.
releaseOutside - Fired whenever the user presses and releases the mouse outside the button.
rollOver - Fired whenever the mouse moves over the button.
rollOut - Fired whenever the mouse leaves the button.
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
releaseOutsideHandler: 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
rollOutHandler: Function
Can be used to assign a direct event handler to the component instance.

public
rollOverHandler: 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
downIcon: String (write)
Sets the linkage name of a symbol to use for the button's down state.

public
downIcon: String (read)
Gets the linkage name of a symbol used for the button's down state.

public
overIcon: String (write)
Sets the linkage name of a symbol to use for the button's over state.

public
overIcon: String (read)
Gets the linkage name of a symbol used for the button's over state.

public
selected: Boolean (write)
True if the button is set to toggle and is currently in a "down" state. Can also be used to set the button's state to down, if toggle is set to true.

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

public
toggle: Boolean (write)
Determine if button is a simple pushbutton, or a button that can be toggled on and off. If toggle is set to true, the buttons up or down state can be set or retrieved with the Button.selected property.

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

public
upIcon: String (write)
Sets the linkage name of a symbol to use for the button's up state.

public
upIcon: String (read)
Gets the linkage name of a symbol used for the button's up state.

Properties inherited from class com.bjc.core.BJCComponent

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

Constructor

public
IconButton ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): IconButton
Static method used to create an instance of a IconButton 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:
myButton.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:
myButton.focusHandler = function(){
trace("Set focus.");
}

killFocusHandler

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

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

releaseOutsideHandler

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

Usage:
myButton.releaseOutsideHandler = function(){
trace("Release outside.");
}

removeEventListener

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

rollOutHandler

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

Usage:
myButton.rollOutHandler = function(){
trace("Roll out.");
}

rollOverHandler

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

Usage:
myButton.rollOverHandler = function(){
trace("Roll over.");
}

tabFocusHandler

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

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


Property Documentation

downIcon

public downIcon: String (write)
Sets the linkage name of a symbol to use for the button's down state.

Example:
myButton.downIcon = "customDownIcon";

downIcon

public downIcon: String (read)
Gets the linkage name of a symbol used for the button's down state.

Example:
myVar = myButton.downIcon;

overIcon

public overIcon: String (write)
Sets the linkage name of a symbol to use for the button's over state.

Example:
myButton.overIcon = "customOverIcon";

overIcon

public overIcon: String (read)
Gets the linkage name of a symbol used for the button's over state.

Example:
myVar = myButton.overIcon;

selected

public selected: Boolean (write)
True if the button is set to toggle and is currently in a "down" state. Can also be used to set the button's state to down, if toggle is set to true.

Example:
myButton.toggle = true;
myButton.selected = true;

See also:

selected

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

Example:
myVar = myButton.selected;

toggle

public toggle: Boolean (write)
Determine if button is a simple pushbutton, or a button that can be toggled on and off. If toggle is set to true, the buttons up or down state can be set or retrieved with the Button.selected property.

Example:
myButton.toggle = true;
myButton.selected = true;

See also:

toggle

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

Example:
myVar = myButton.toggle;

upIcon

public upIcon: String (write)
Sets the linkage name of a symbol to use for the button's up state.

Example:
myButton.upIcon = "customUpIcon";

upIcon

public upIcon: String (read)
Gets the linkage name of a symbol used for the button's up state.

Example:
myVar = myButton.upIcon;


Constructor Documentation

IconButton

public function IconButton(Void)

Method Documentation

create

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

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

Example:
import com.bjc.controls.IconButton;
var newIconButton:IconButton = IconButton.create(_root, "myIconButton", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com