Developer Network Home  Help 

YDN Flash Developer Center Astra Flash Components AlertManager
Flash Developer Center

ASTRA AlertManager

AlertManager is a UI component that creates and manages the queuing of alert windows in a Flash Application.

Getting Started: AlertManager for Flash CS3

Similar to other Flash components, you can create an AlertManager by placing an instance of AlertManager on the stage or by using ActionScript to create an instance dynamically.

Initializing an AlertManager on the Stage

The easiest way to create a AlertManager is to drag it from the Components panel to the stage. This will immediately create a AlertManager instance and add it to the display list. For more advanced functionality, you must manipulate the AlertManager with ActionScript.

Screen capture of Alert

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the FLA file.

Initializing a AlertManager with ActionScript

To include an Alert in your application with ActionScript, you must first add the AlertManager component to your library. You can do so by dragging it from the Components panel directly to the library, or by dragging an instance to the stage, and immediately removing it (it will stay in your library). Additionally, you need to import the following class for use in your class or frame script.

The class com.yahoo.astra.fl.managers.AlertManager is the main required class for an AlertManager control.

To create an Alert, you call the AlertManager.createAlert() method. This is a static method, so you actually call it on the AlertManager class (hence the uppercase "AlertManager"). This method has 2 required parameters and six optional parameters used for customization.

Download the FLA file.

For additional topics, please read Using AlertManager, or take a look at the Examples section for functional demonstrations. The ActionScript 3.0 Class Reference contains full details on every property, method, and style available to the AlertManager component.