Flash Lite 2.x and 3 Help

Key class

The Key class provides methods and properties for obtaining information about the keyboard itself, and the keypresses input into it.

For more information about the Key class, see the following:

  • Developing Flash Lite 2.x and 3.0 Applications
  • Chapter 14, "Creating Interaction with ActionScript," in Learning ActionScript 2.0 in Flash
  • Chapter 2, "ActionScript Classes," in Flash Lite 2.x and 3.0 ActionScript Language Reference

Flash Lite property extensions

The following table lists the property that has been added to the Key class when using ActionScript for Flash Lite 2.x and later.

Property

Description

Support

isToggled

Returns true if the Num Lock or Caps Lock key is active.

Not supported

Flash Lite method extensions

The following table lists the method extension that has been added to the Key class when using ActionScript for Flash Lite 2.x and later.

Method

Description

getCode()

Returns the virtual key code of the last key pressed.

The Flash Lite 2.x and 3.0 implementation of the getCode() method returns a string or a number, depending on what the platform passed in. The only valid key codes are the standard key codes accepted by this class and the "special" key codes listed as properties of the ExtendedKey class. This restriction is enforced by the player. For valid key code values, see the Key class in the Flash Lite 2.x and 3.0 ActionScript Language Reference. This reference provides tables that map keys to codes for letters, numbers, the numeric keypad, function keys, special constant keys, and other keys.

 

Send me an e-mail when comments are added to this page | Comment Report