Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class Alert

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


class Alert
extends LabelWrapper

An alert box that can be popped up to display a message.

Events:

close - Fired when the user clicks the close button on the window, just prior to the component being removed.


Author:
Flashloaded - www.flashloaded.com


Field Summary

public
addEventListener: Function
See the EventDispatcher Class in Flash Help

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

public
removeEventListener: Function
See the EventDispatcher Class in Flash Help

Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
html: Boolean (write)
If true, message may contain html tags (limited to those that Flash handles).

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

public
message: String (write)
Sets the message displayed in the alert box. This is usually set as a parameter in the create function, but can also be set or changed here.
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "I'm thinking...", "This is an alert.");
myAlert.message = "Warning, you can't do that!";


public
message: String (read)
Gets the message displayed in the alert box.
myVar = myAlert.message;


public
title: String (write)
Sets the title displayed in the alert window title bar. This is usually set as a parameter in the create function, but can also be set or changed here.
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "Warning, you can't do that!", "I'm thinking...");
myAlert.title = "This is an alert.";


public
title: String (read)
Gets the title displayed in the alert window title bar.
myVar = myAlert.title = "This is an alert.";


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


Method Summary

public static
create ( target: MovieClip, depth: Number, message: String, title: String, initObj: Object ): Alert
Static method used to pop up an alert. Note, you must have the Alert component in the library of the movie that calls this function.

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

closeHandler

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

Usage:
myAlert.closeHandler = function(){
trace("I am about to close.");
}

removeEventListener

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


Property Documentation

html

public html: Boolean (write)
If true, message may contain html tags (limited to those that Flash handles).

Example:
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "<b>Warning</b>, you can't do that!", "This is an alert.");
myAlert.html = true;

html

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

Example:
myVar = myAlert.html;

message

public message: String (write)
Sets the message displayed in the alert box. This is usually set as a parameter in the create function, but can also be set or changed here.
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "I'm thinking...", "This is an alert.");
myAlert.message = "Warning, you can't do that!";

message

public message: String (read)
Gets the message displayed in the alert box.
myVar = myAlert.message;

title

public title: String (write)
Sets the title displayed in the alert window title bar. This is usually set as a parameter in the create function, but can also be set or changed here.
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "Warning, you can't do that!", "I'm thinking...");
myAlert.title = "This is an alert.";

title

public title: String (read)
Gets the title displayed in the alert window title bar.
myVar = myAlert.title = "This is an alert.";


Constructor Documentation

Alert

public function Alert(Void)

Method Documentation

create

public static function create(target: MovieClip,
 depth: Number,
 message: String,
 title: String,
 initObj: Object): Alert
Static method used to pop up an alert. Note, you must have the Alert component in the library of the movie that calls this function.

Parameters:
target
the movie clip in which the alert will be created.
depth
the depth at which to create the alert.
message
the message that will be shown in the alert box
title
the title shown in the alert window title bar
initObj
(optional) an object containing any properties you want to assign to the component when it is created
Returns:
reference to the alert object created.

Example:
import com.bjc.controls.Alert;
var myAlert:Alert = com.bjc.controls.Alert.create(_root, 1000, "Warning, you can't do that!", "This is an alert.");


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com