Flash Lite 2.x and 3.0 ActionScript Language Reference

ExtendedKey

Object
    |
    +-ExtendedKey

public class ExtendedKey
extends Object

Provides extended key codes that can be returned from the Key.getCode() method.

Example

The following example creates a listener that is called when a key is pressed. It uses the Key.getCode() method to get the key code for the key that was pressed:

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);


See also

getCode (Key.getCode method)

Property summary

Modifiers

Property

Description

static

SOFT1:String

The key code value for the SOFT1 soft key.

static

SOFT10:String

The key code value for the SOFT10 soft key.

static

SOFT11:String

The key code value for the SOFT11 soft key.

static

SOFT12:String

The key code value for the SOFT12 soft key.

static

SOFT2:String

The key code value for the SOFT2 soft key.

static

SOFT3:String

The key code value for the SOFT3 soft key.

static

SOFT4:String

The key code value for the SOFT4 soft key.

static

SOFT5:String

The key code value for the SOFT5 soft key.

static

SOFT6:String

The key code value for the SOFT6 soft key.

static

SOFT7:String

The key code value for the SOFT7 soft key.

static

SOFT8:String

The key code value for the SOFT8 soft key.

static

SOFT9:String

The key code value for the SOFT9 soft key.

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)

Method summary

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)