Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Key > _listeners (Key._listeners property) | |||
public static _listeners : Array [read-only]
A list of references to all listener objects that are registered with the Key object. This property is intended for internal use, but it may be useful if you want to ascertain the number of listeners currently registered with the Key object. Objects are added to and removed from this array by calls to the addListener() and removelistener() methods.
Availability: ActionScript 1.0; Flash Player 6
The following example shows how to use the length property to ascertain the number of listener objects currently registered to the Key object.
var myListener:Object = new Object();
myListener.onKeyDown = function () {
trace ("You pressed a key.");
}
Key.addListener(myListener);
trace(Key._listeners.length); // Output: 1
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001766.html