Alert.ok - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

You can also use
to indicate that the Alert window is nonmodal. A
Alert.NONMODAL
nonmodal window allows a user to interact with other windows in the application.
The parent window for the Alert component. The Alert window centers itself in the
parent
parent window. Use the value
or
to specify the _root timeline. The parent
null
undefined
window must be a subclass of the UIComponent class, either as another Flash component
that is a subclass of UIComponent, or as a custom window that is a subclass of the
UIComponent (for more information see "About inheritance" in Learning ActionScript 2.0 in
Flash. This parameter is optional.
A handler for the
events broadcast when the buttons are clicked. In
clickHandler
click
addition to the standard click event object properties, there is an additional
property,
detail
which contains the flag value of the button that was clicked (
,
,

Alert.OK

Alert.CANCEL
,
). This handler can be a function or an object. For more information,
Alert.YES
Alert.NO
see "Using listeners to handle events" in Using Components.
A string that is the linkage identifier of a symbol in the library; this symbol is used as
icon
an icon displayed to the left of the alert text. This parameter is optional.
Indicates which button has initial focus and is clicked when a user presses
defaultButton
Enter (Windows) or Return (Macintosh). If a user tabs to another button, that button is
triggered when the Enter key is pressed.
This parameter can be one of the following values:
,
,
,
Alert.OK
Alert.CANCEL
Alert.YES
.
Alert.NO
Returns
The Alert instance that is created.
Description
Method (class); a class (static) method that displays an Alert window with a message, an
optional title, optional buttons, and an optional icon. The title of the alert appears at the top
of the window and is left-aligned. The icon appears to the left of the message text. The
buttons are centered below the message text and the icon.
Example
The following code is a simple example of a modal Alert window with an OK button:
mx.controls.Alert.show("Hello, world!");
Alert.show()
85

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents