03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Event summary<br />

Event Description<br />

onKeyDown =<br />

function() {}<br />

onKeyUp =<br />

function() {}<br />

Method summary<br />

Methods inherited from class Object<br />

addListener (Key.addListener method)<br />

public static addListener(listener:Object) : Void<br />

Registers an object to receive onKeyDown <strong>and</strong> onKeyUp notification. When a key is pressed or<br />

released, regardless of the input focus, all listening objects registered with addListener()<br />

have either their onKeyDown method or their onKeyUp method invoked. Multiple objects can<br />

listen for keyboard notifications. If the listener is already registered, no change occurs.<br />

Parameters<br />

listener:Object - An object with onKeyDown <strong>and</strong> onKeyUp methods.<br />

346 ActionScript classes<br />

Notified when a key is pressed.<br />

Notified when a key is released.<br />

Modifiers Signature Description<br />

static addListener(listener<br />

:Object) : Void<br />

Registers an object to receive onKeyDown <strong>and</strong><br />

onKeyUp notification.<br />

static getAscii() : Number Returns the ASCII code of the last key pressed or<br />

released.<br />

static getCode() : Number Returns the key code value of the last key pressed.<br />

static isDown(code:Number)<br />

: Boolean<br />

static removeListener(liste<br />

ner:Object) :<br />

Boolean<br />

Returns true if the key specified in code is<br />

pressed; false otherwise.<br />

Removes an object previously registered with<br />

Key.addListener().<br />

addProperty (Object.addProperty method), hasOwnProperty<br />

(Object.hasOwnProperty method), isPropertyEnumerable<br />

(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf<br />

method), registerClass (Object.registerClass method), toString<br />

(Object.toString method), unwatch (Object.unwatch method), valueOf<br />

(Object.valueOf method), watch (Object.watch method)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!