Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Key | |||
Object
|
+-Key
public class Key
extends Object
The Key class is a top-level class whose methods and properties you can use without 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 applications, such as Arrow keys, Page Up, and Page Down.
A Flash application can only monitor keyboard events that occur within its focus. A Flash application cannot detect keyboard events in another application.
Availability: ActionScript 1.0; Flash Player 6
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
The key code value for the Backspace key (8). |
|
|
|
The key code value for the Caps Lock key (20). |
|
|
|
The key code value for the Control key (17). |
|
|
|
The key code value for the Delete key (46). |
|
|
|
The key code value for the Down Arrow key (40). |
|
|
|
The key code value for the End key (35). |
|
|
|
The key code value for the Enter key (13). |
|
|
|
The key code value for the Escape key (27). |
|
|
|
The key code value for the Home key (36). |
|
|
|
The key code value for the Insert key (45). |
|
|
|
The key code value for the Left Arrow key (37). |
|
|
|
_listeners |
A list of references to all listener objects that are registered with the Key object. |
|
|
The key code value for the Page Down key (34). |
|
|
|
The key code value for the Page Up key (33). |
|
|
|
The key code value for the Right Arrow key (39). |
|
|
|
The key code value for the Shift key (16). |
|
|
|
The key code value for the Spacebar (32). |
|
|
|
The key code value for the Tab key (9). |
|
|
|
The key code value for the Up Arrow key (38). |
Properties inherited from class Object constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)
|
Event |
Description |
|---|---|
|
onKeyDown |
Notified when a key is pressed. |
|
onKeyUp |
Notified when a key is released. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
addListener |
Registers an object to receive |
|
|
Returns the ASCII code of the last key pressed or released. |
|
|
|
Returns the key code value of the last key pressed. |
|
|
|
isAccessible |
Returns a Boolean value indicating, depending on security restrictions, whether the last key pressed may be accessed by other SWF files. |
|
|
Returns |
|
|
|
Returns |
|
|
|
removeListener |
Removes an object previously registered with |
Methods inherited from class Object
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001748.html