Extendedkey - 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

See also
message (Error.message property)
statement

ExtendedKey

Object
|
+-ExtendedKey
public class ExtendedKey
extends
Object
Provides extended key codes that can be returned from the
Availability: ActionScript 2.0; Flash Lite 2.0
Example
The following example creates a listener that is called when a key is pressed. It uses the
method to get the key code for the key that was pressed:
Key.getCode()
var myListener = new Object();
myListener.onKeyDown = function() {
var code = Key.getCode();
switch(code) {
case 50:
trace("number 2 down");
break;
case Key.ENTER:
trace("enter down");
break;
case ExtendedKey.SOFT1:
trace("soft1 down");
break;
default:
trace(code + " down");
break;
}
}
myListener.onKeyUp = function() {
text2 = "onKeyUp called";
}
Key.addListener(myListener);
362
ActionScript classes
,
,
throw statement
Key.getCode()
try..catch..finally
method.

Advertisement

Table of Contents
loading

Table of Contents