EventKey

Kind of class:class
Inherits from:EventDispatcher < CoreObject
Version:10/16/06
Author:Aaron Clinger
Classpath:org.casaframework.key.EventKey
File last modified:Sunday, 19 August 2007, 13:43:30
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

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 () : EventKey
Returns:
EventKey instance.