Example
In the following example, a handler called
method as the fifth parameter. The event object is captured by
Alert.show()
in the
parameter. The
evt
to send the name of the button that was clicked (
panel.
import mx.controls.Alert;
myClickHandler = function(evt){
if(evt.detail == Alert.OK){
trace(Alert.okLabel);
}else if (evt.detail == Alert.CANCEL){
trace(Alert.cancelLabel);
}
}
Alert.show("This is a test of errors", "Error", Alert.OK | Alert.CANCEL, this,
myClickHandler);
Alert.NO
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Alert.NO
Description
Property (constant); a property with the constant hexadecimal value 0x2. This property can be
used for the
flags
value for the
flags
Alert window. When used as a value for the
initial focus and is triggered when the user presses Enter (Windows) or Return (Macintosh). If the
user tabs to another button, that button is triggered when the user presses Enter.
Example
The following example uses
displays an Alert component with a No button and a Yes button:
import mx.controls.Alert;
Alert.show("This is a generic Alert window", "Alert Test", Alert.NO |
Alert.YES, this);
126
Chapter 6: Components Dictionary
property of the event object is then used in a
detail
or
parameter of the
defaultButton
parameter, this property indicates that a No button should be displayed in the
and
Alert.NO
is defined and passed to the
myClickHandler
or
Alert.OK
Alert.CANCEL
Alert.show()
parameter, the Cancel button has
defaultButton
as values for the
Alert.YES
myClickHandler
statement
trace
) to the Output
method. When used as a
parameter and
flags
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?