MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 295

Actionscript language reference
Table of Contents

Advertisement

Key class
Availability
Flash Player 6.
Description
The Key class is a top-level class whose methods and properties you can use without using a
constructor. Use the methods of the Key class to build an interface that can be controlled by a
user with a standard keyboard. The properties of the Key class are constants representing the keys
most commonly used to control games. For a complete list of key code values, see
"Keyboard Keys and Key Code Values," on page
Method summary for the Key class
Method
Key.addListener()
Key.getAscii()
Key.getCode()
Key.isDown()
Key.isToggled()
Key.removeListener()
Property summary for the Key class
All the properties for the Key class are constants.
Property
Key.BACKSPACE
Key.CAPSLOCK
Key.CONTROL
Key.DELETEKEY
Key.DOWN
Key.END
Key.ENTER
Key.ESCAPE
Key.HOME
Key.INSERT
Key.LEFT
Key.PGDN
Description
Registers an object to receive notification when the
methods are invoked.
Returns the ASCII value of the last key pressed.
Returns the virtual key code of the last key pressed.
Returns
if the key specified in the parameter is pressed.
true
Returns
if the Num Lock or Caps Lock key is activated.
true
Removes an object that was previously registered with
Description
The key code value for the Backspace key.
The key code value for the Caps Lock key.
The key code value for the Control key.
The key code value for the Delete key.
The key code value for the Down Arrow key.
The key code value for the End key.
The key code value for the Enter key.
The key code value for the Escape key.
The key code value for the Home key.
The key code value for the Insert key.
The key code value for the Left Arrow key.
The key code value for the Page Down key.
ActionScript Core Classes
811.
CHAPTER 6
Appendix B,
and
onKeyDown
onKeyUp
Key.addListener().
Key code
8
20
17
46
40
35
13
27
36
45
37
34
Key class
295

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents