User Guide

Alert component (Flash Professional only) 125
Alert.cancelLabel
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Alert.cancelLabel
Description
Property (class); a class (static) property that indicates the label text on the Cancel button.
Example
The following example sets the Cancel buttons label to “cancellation”:
Alert.cancelLabel = "cancellation";
Alert.click
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
clickHandler = function(eventObject){
// insert code here
}
Alert.show(message[, title[, flags[, parent[, clickHandler[, icon[,
defaultButton]]]]]])
Description
Event; broadcast to the registered listener when the OK, Yes, No, or Cancel button is clicked.
Version 2 components use a dispatcher/listener event model. The Alert component dispatches a
click event when one of its buttons is clicked and the event is handled by a function, also called
a handler, on a listener object (
listenerObject) that you create. You call the Alert.show()
method and pass it the name of the handler as a parameter. When a button in the Alert window is
clicked, the listener is called.
When the event occurs, it automatically passes an event object (
eventObject) to the handler.
Each event object has properties that contain information about the event. You can use these
properties to write code that handles the event. The
Alert.click events event object has an
additional
detail property whose value is Alert.OK, Alert.CANCEL, Alert.YES, or Alert.NO,
depending on which button was clicked. For more information, see “EventDispatcher class
on page 415.