User Guide
356 Chapter 2: ActionScript Language Reference
Key.INSERT
Availability
Flash Player 5.
Usage
Key.INSERT:Number
Description
Property; constant associated with the key code value for the Insert key (45).
Example
The following example creates a new listener object and defines a function for onKeyDown. The
last line uses
addListener() to register the listener with the Key object so that it can receive
notification from the key down event and display information in the Output panel.
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.INSERT)) {
trace("You pressed the Insert key.");
}
};
Key.addListener(keyListener);