beautypg.com

Keyup() – Adobe Extending Flash Professional CS5 User Manual

Page 40

background image

18

EXTENDING FLASH PROFESSIONAL

Top-Level Functions and Methods

Last updated 5/2/2011

Usage

function keyDown() {

// statements

}

Parameters
None.

Returns
Nothing.

Description
Function; called when the extensible tool is active and the user presses a key. The script should call

tools.getKeyDown()

to determine which key was pressed.

Example
The following example displays information about which key was pressed when the extensible tool is active and the
user presses a key.

function keyDown() {

fl.trace("key " + fl.tools.getKeyDown() + " was pressed");

}

See also

keyUp()

,

tools.getKeyDown()

keyUp()

Availability
Flash MX 2004.

Usage

function keyUp() {

// statements

}

Parameters
None.

Returns
Nothing.

Description
Function; called when the extensible tool is active and a key is released.

Example
The following example displays a message in the Output panel when the extensible tool is active and a key is released.

This manual is related to the following products: