User Guide
372 ActionScript classes
Method summary
Methods inherited from class Object
addListener (Key.addListener method)
public static addListener(listener:Object) : Void
Registers an object to receive onKeyDown and onKeyUp notification. When a key is pressed or
released, regardless of the input focus, all listening objects registered with
addListener()
have either their
onKeyDown method or their onKeyUp method invoked. Multiple objects can
listen for keyboard notifications. If the listener is already registered, no change occurs.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
listener:Object - An object with onKeyDown and onKeyUp methods.
Modifiers Signature Description
static addListener(listener:Object) :
Void
Registers an object to receive
onKeyDown and onKeyUp notification.
static getAscii() : Number Returns the ASCII code of the last key
pressed or released.
static getCode() : Number Returns the key code value of the last
key pressed.
static isDown(code:Number) : Boolean Returns true if the key specified in code
is pressed; false otherwise.
static removeListener(listener:Object) :
Boolean
Removes an object previously registered
with Key.addListener().
addProperty (Object.addProperty method), hasOwnProperty
(Object.hasOwnProperty method), isPropertyEnumerable
(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf
method), registerClass (Object.registerClass method), toString
(Object.toString method), unwatch (Object.unwatch method), valueOf
(Object.valueOf method), watch (Object.watch method)