EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - BACKSPACE (Key.backspace Property); CAPSLOCK (Key.capslock Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Key 673
Key.addListener(myListener);
my_btn.onPress = myOnPress;
my_btn._accProps.shortcut = "Ctrl+7";
Accessibility.updateProperties();
See also
getCode (Key.getCode method), isDown (Key.isDown method), onKeyDown
(Key.onKeyDown event listener)
, onKeyUp (Key.onKeyUp event listener),
removeListener (Key.removeListener method)
BACKSPACE (Key.BACKSPACE property)
public static BACKSPACE : Number
The key code value for the Backspace key (8).
Availability: ActionScript 1.0; Flash Player 5
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 you use this example, be sure to select Control > Disable Keyboard Shortcuts in the test
environment.
CAPSLOCK (Key.CAPSLOCK property)
public static CAPSLOCK : Number
The key code value for the Caps Lock key (20).
Availability: ActionScript 1.0; Flash Player 5

Table of Contents

Related product manuals