ActionScript Reference
com.bjc.ccs1
mx.core.UIComponent | +--com.bjc.ccs1.BJCButton
myBJCButton.setCallback( "myCallback" ); // Set the function to call on click
function myCallback( value )
{
if( value == 1 )
{
trace( "BUTTON UP" ); // This code will run on up state
}
else if( value == 2 )
{
trace( "BUTTON DOWN" ); // This code will run on pressed state
}
}Property Summary | |
| public | BgColor: Number (write-only) |
| This property may be used to set the background color. | |
| public | CallBackFunction: String (write-only) |
| This property may be used to set the function to be called when the button has been clicked. | |
| public | Mode: String (write-only) |
| This property may be used to set the button mode. | |
| public | Start: String (write-only) |
| This property may be used to set the state on start. | |
| public | TitleColor: Number (write-only) |
| This property may be used to set the font color. | |
| public | TitleFont: String (write-only) |
| This property may be used to set the text font. | |
| public | TitlePressed: String (write-only) |
| This property may be used to set the title of the pressed state. | |
| public | TitleReg: String (write-only) |
| This property may be used to set the title of the regular mode. | |
| public | TitlesVisible: String (write-only) |
| This property may be used to set the title visibility. | |
| public | TitleUp: String (write-only) |
| This property may be used to set the title of the up state. | |
Constructor | |
| BJCButton ( ) | |
| Constructor | |
Method Summary | |
| public | getValue ( ): Number |
| This method may be used to get the current state value of the button. | |
| public | setBgColor ( col: Number ): Void |
| This method may be used to set the background color of the button. | |
| public | setCallback ( cb: String ): Void |
| This method may be used to set the function to be called when the button is pressed. | |
| public | setMode ( mode: String ): Void |
| This method may be used to set mode of the button. | |
| public | setOff ( ): Void |
| This method may be used to set the button state to 'Up'. | |
| public | setOn ( ): Void |
| This method may be used to set the button state to 'Pressed'. | |
| public | setTitles ( view: Boolean, font: String, color: Number, text1: String, text2: String ): Void |
| This method may be used to set the visibility of the title field and changes the title texts. | |
|
| This property may be used to set the background color. |
|
| This property may be used to set the function to be called when the button has been clicked. |
|
| This property may be used to set the button mode. |
|
| This property may be used to set the state on start. |
|
| This property may be used to set the font color. |
|
| This property may be used to set the text font. |
|
| This property may be used to set the title of the pressed state. |
|
| This property may be used to set the title of the regular mode. |
|
| This property may be used to set the title visibility. |
|
| This property may be used to set the title of the up state. |
|
| Constructor |
|
This method may be used to get the current state value of the button.
|
|
|
This method may be used to set the background color of the button.
| |||
|
|
| This method may be used to set the function to be called when the button is pressed. This method may be used to set the function to be called when the button is pressed. The called function must be in the same timeline as the component or the path to the function must be specified as well.
| |||
|
|
| This method may be used to set mode of the button. This method may be used to set mode of the button. The On/Off mode has two states: 'Up' and 'Pressed'. The Regular mode has only one state.
| |||
|
|
This method may be used to set the button state to 'Up'.
|
|
|
This method may be used to set the button state to 'Pressed'.
|
|
|
This method may be used to set the visibility of the title field and changes the title texts.
| |||||||||||||||
|