| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
CallAlert |
|
|
See also
| Property | Defined By |
|---|---|
|
textFormat
: TextFormat
The TextFormat for the label. |
CallAlert |
|
myHeight
: int
The height of the component instance. |
CallAlert |
|
myWidth
: int
The width of the component instance. |
CallAlert |
|
textCol
: uint
The color of the label. |
CallAlert |
| Method | Defined By |
|---|---|
|
CallAlert()
Creates a new instance of the CallAlert class. |
CallAlert |
|
initAlert(label:String, yesNo:Boolean, target:Object)
Initiates the CallAlert class. |
CallAlert |
| Event | Defined By |
|---|---|
|
alertCall This event is dispatched when the "yes" or "no" button is pressed. |
CallAlert |
| Property Detail |
|---|
|
textFormat property textFormat:TextFormat [read-write] This will implement a new textformat for the label. The default value is the Flash TextFormat default format. Implementationpublic function get textFormat():TextFormatpublic function set textFormat(value:TextFormat):void |
|
myHeight property myHeight:int [read-write] This sets the height for the AlertBox component. The default value is 150. Implementationpublic function get myHeight():intpublic function set myHeight(value:int):void |
|
myWidth property myWidth:int [read-write] This sets the width for the AlertBox component. The default value is 200. Implementationpublic function get myWidth():intpublic function set myWidth(value:int):void |
|
textCol property textCol:uint [read-write] This defines the textcolor for the label. The default value is 0x333333. Implementationpublic function get textCol():uintpublic function set textCol(value:uint):void |
| Constructor Detail |
|---|
|
CallAlert () Constructor
public function CallAlert() |
| Intializes a new AlertBox instance. |
| Method Detail |
|---|
|
initAlert () method
This method will initiate the AlertBox call. |
Parameters
|
| Event Detail |
|---|
|
alertCall event
Event Object Type:
biz.flashscript.components.alert.CallAlert
Dispatched when a "yes" or "no" button is pressed. To detect, which button was pressed use the instance name and the answer property (see example). |
| Examples |
|---|
Create a new fla file and name it CallAlert.fla. Place the fla in the same folder as the biz folder. Add any kind of objects on the main timeline. Then create an Actionscript file, name it Callalerts.as and place this script. Make sure the AlertBox component is installed and in the library of this fla file. You should see an AlertBox instance popping up and the background blurred.
package
{
import flash.display.Sprite;
import flash.events.Event;
import biz.flashscript.components.alert.CallAlert;
public class Callalerts extends Sprite
{
private var ca:CallAlert;
public function Callalerts ():void
{
ca = new CallAlert();
ca.textCol = 0xFF0000;
ca.initAlert ("This is an Alert example",true,this);
ca.addEventListener (CallAlert.ALERT_CALL, changeHandler);
}
private function changeHandler (ev:Event):void
{
trace (ca.answer);
}
}
}
|