Flash 8 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 |
|---|---|---|
|
|
BACKSPACE |
The key code value for the Backspace key (8). |
|
|
CAPSLOCK |
The key code value for the Caps Lock key (20). |
|
|
CONTROL |
The key code value for the Control key (17). |
|
|
DELETEKEY |
The key code value for the Delete key (46). |
|
|
DOWN |
The key code value for the Down Arrow key (40). |
|
|
END |
The key code value for the End key (35). |
|
|
ENTER |
The key code value for the Enter key (13). |
|
|
ESCAPE |
The key code value for the Escape key (27). |
|
|
HOME |
The key code value for the Home key (36). |
|
|
INSERT |
The key code value for the Insert key (45). |
|
|
LEFT |
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. |
|
|
PGDN |
The key code value for the Page Down key (34). |
|
|
PGUP |
The key code value for the Page Up key (33). |
|
|
RIGHT |
The key code value for the Right Arrow key (39). |
|
|
SHIFT |
The key code value for the Shift key (16). |
|
|
SPACE |
The key code value for the Spacebar (32). |
|
|
TAB |
The key code value for the Tab key (9). |
|
|
UP |
The key code value for the Up Arrow key (38). |
Properties inherited from class Object
|
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 |
|
|
getAscii |
Returns the ASCII code of the last key pressed or released. |
|
|
getCode |
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. |
|
|
isDown |
Returns |
|
|
isToggled |
Returns |
|
|
removeListener |
Removes an object previously registered with |
Methods inherited from class Object addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002294.html
Comments
nectil said on Sep 27, 2005 at 2:25 AM : Whittaker007 said on Oct 24, 2005 at 10:43 PM :