User Guide

Key.BACKSPACE 345
Key.BACKSPACE
Availability
Flash Player 5.
Usage
Key.BACKSPACE:Number
Description
Property; constant associated with the key code value for the Backspace key (8).
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.
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.BACKSPACE)) {
trace("you pressed the Backspace key.");
} else {
trace("you DIDN'T press the Backspace key.");
}
};
Key.addListener(keyListener);
When using this example, make sure that you select Control > Disable Keyboard Shortcuts in the
test environment.