beautypg.com

Deactivate(), Keydown() – Adobe Extending Flash Professional CS5 User Manual

Page 39

background image

17

EXTENDING FLASH PROFESSIONAL

Top-Level Functions and Methods

Last updated 5/2/2011

Description
Method; displays a string in a modal Alert dialog box, along with OK and Cancel buttons.

Note: If there are no documents (FLA files) open, this method fails with an error condition.

Example
The following example displays the message “Sort data?” in an Alert dialog box:

confirm("Sort data?");

See also

alert()

,

prompt()

deactivate()

Availability
Flash MX 2004.

Usage

function deactivate() {

// statements

}

Parameters
None.

Returns
Nothing.

Description
Function; called when the extensible tool becomes inactive (that is, when the active tool changes from this tool to
another one). Use this function to perform any cleanup the tool needs.

Example
The following example displays a message in the Output panel when the tool becomes inactive:

function deactivate() {

fl.trace( "Tool is no longer active" );

}

keyDown()

Availability
Flash MX 2004.

This manual is related to the following products: