Backspace (Key.backspace Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates a new listener object and defines a function for
. The last line uses
onKeyUp
it can receive notification from the key down and key up events.
var myListener:Object = new Object();
myListener.onKeyDown = function () {
trace ("You pressed a key.");
}
myListener.onKeyUp = function () {
trace ("You released a key.");
}
Key.addListener(myListener);
See also
getCode (Key.getCode method)
(Key.onKeyDown event listener)
removeListener (Key.removeListener method)

BACKSPACE (Key.BACKSPACE property)

public static BACKSPACE :
The key code value for the Backspace key (8).
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a new listener object and defines a function for
The last line uses
addListener()
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.
to register the listener with the Key object so that
addListener()
,
isDown (Key.isDown method)
,
onKeyUp (Key.onKeyUp event listener)
Number
to register the listener with the Key object so that it can
and
onKeyDown
,
onKeyDown
,
onKeyDown
Key
.
373

Advertisement

Table of Contents
loading

Table of Contents