EventKey
Kind of class: | class |
---|---|
Inherits from: | EventDispatcher < CoreObject |
Version: | 10/16/06 |
Author: | Aaron Clinger |
Classpath: | org.casalib.key.EventKey |
File last modified: | Monday, 01 December 2008, 13:34:40 |
Dispatches key events to observers. Should be used instead of
Key.addListener
.Example:
-
function onKeyDown(code:Number, ascii:Number):Void { trace("Code: " + code + "\tACSII: " + ascii + "\tKey: " + String.fromCharCode(ascii)); } var keyInstance:EventKey = EventKey.getInstance(); this.keyInstance.addEventObserver(this, EventKey.EVENT_KEY_DOWN);
Events broadcasted to listeners:
onKeyDown = function (code:Number, ascii:Number) {}
onKeyUp = function (code:Number, ascii:Number) {}
Summary
Class properties
- EVENT_KEY_UP : String
- EVENT_KEY_DOWN : String
Class methods
Instance methods
Instance methods inherited from EventDispatcher
Instance methods inherited from CoreObject
Class properties
EVENT_KEY_DOWN
static EVENT_KEY_DOWN:String = 'onKeyDown'
(read,write)
EVENT_KEY_UP
static EVENT_KEY_UP:String = 'onKeyUp'
(read,write)