| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
AlertBox |
|
|
See also
| Property | Defined By |
|---|---|
|
myBlur
: int
Will cause blurring of the background. |
AlertBox |
|
myLabel
: String
The label shown in the component instance. |
AlertBox |
|
positionx
: int
The x position of the component instance. |
AlertBox |
|
positiony
: int
The y position of the component instance. |
AlertBox |
|
textCol
: uint
The color of the label. |
AlertBox |
|
textFormat
: TextFormat
The TextFormat for the label. |
AlertBox |
|
yes_noAlert
: Boolean
Whether a the yes-no buttons will be shown. |
AlertBox |
| Method | Defined By |
|---|---|
|
AlertBox()
Creates a new instance of the AlertBox component. |
AlertBox |
| Event | Defined By |
|---|---|
| All inherited events for the Sprite class. |
| Property Detail |
|---|
|
myBlur
property
myBlur:int [read-write] Setting a value will cause blurring depending on the value. The default value is 0. .Implementationpublic function get myBlur():intpublic function set myBlur(value:int):void |
|
myLabel property myLabel:String [read-write] This defines the label for the AlertBox component. The default value is defaulValue. .Implementationpublic function get myLabel():Stringpublic function set myLabel(value:String):void |
|
positionx property positionx:int [read-write] This is the x position for the AlertBox component. If it is 0 the x position of the component instance will be automatically the center of the stage. The default value is 0. Implementationpublic function get positionx():intpublic function set positionx(value:int):void |
|
positiony property positiony:int [read-write] This is the y position for the AlertBox component. If it is 0 the y position of the component instance will be automatically the center of the stage. The default value is 0. Implementationpublic function get positiony():intpublic function set positiony(value:int):void |
|
textCol property textCol:uint [read-write] This defines the textcolor for the label. The default value is 0x000000. Implementationpublic function get textCol():uintpublic function set textCol(value:uint):void |
|
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 |
|
yes_noAlert property yes_noAlert:Boolean [read-write] If set to true the AlertBox instance will have two buttons. There is no function associated with the buttons. The default value is 0. Implementationpublic function get yes_noAlert():Booleanpublic function set yes_noAlert(value:Boolean):void
See also
biz.flashscript.components.alert.CallAlert |
| Constructor Detail |
|---|
|
AlertBox () Constructor
public function AlertBox() |
| Intializes a new AlertBox instance. |
| Examples |
|---|
Create a new fla file and name it AlertBox.fla. Place the fla in the same folder as the biz folder. Add any kind of objects on the main timeline. Then add this script in a frame on the main timeline and test movie. You should see an AlertBox instance popping up and the background blurred.
import biz.flashscript.components.alert.AlertBox;
import flash.events.*;
var format:TextFormat = new TextFormat ();
format.align = TextFormatAlign.CENTER;
format.font = "Lucida Fax";
format.size = 20;
format.bold = true;
format.italic = true;
var myAlert:AlertBox = new AlertBox ();
myAlert.name = "alertBox";
myAlert.textFormat = format;
myAlert.textCol = 0xFF0000;
myAlert.myLabel = "This is working well right now!";
myAlert.yes_noAlert = true;
addChild (myAlert);
myAlert.yBut.addEventListener (MouseEvent.CLICK, yesAlert);
function yesAlert (ev:MouseEvent):void
{
trace ("YES!");
}
myAlert.nBut.addEventListener (MouseEvent.CLICK, noAlert);
function noAlert (ev:MouseEvent):void
{
trace ("NO!");
}
|