Access keys

EventKey

Kind of class: class
Inherits from: EventDispatcher < CoreObject
Version: 10/16/06
Author: Aaron Clinger
Classpath: org.casaframework.key.EventKey
File last modified: Monday, 08 January 2007, 09:57:51
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 broadcast to listeners:
onKeyDown = function (code:Number, ascii:Number) {}
onKeyUp = function (code:Number, ascii:Number) {}

Summary

Class properties
Instance properties
Instance properties inherited from EventDispatcher
Instance properties inherited from CoreObject
Class methods

Class properties

EVENT_KEY_DOWN

static EVENT_KEY_DOWN:String = 'onKeyDown'
(read,write)

EVENT_KEY_UP

static EVENT_KEY_UP:String = 'onKeyUp'
(read,write)

Class methods

getInstance

static function getInstance (
Returns:
EventKey instance.