User Guide

Alert.click 79
Alert.click
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
var clickHandler:Object = function(eventObject:Object) {
// 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 event’s 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 499.