Flash Lite 2.x and 3.0 ActionScript Language Reference

SOFT1 (ExtendedKey.SOFT1 property)

public static SOFT1 : String

The key code value for the SOFT1 soft key. The SOFT1 key code always corresponds to the left soft key; the SOFT2 always corresponds to the right soft key.

Example

The following example creates a listener that handles the left and right soft keys:

var myListener:Object = new Object();
myListener.onKeyDown = function () {
var keyCode = Key.getCode();
switch (keyCode) {
    case ExtendedKey.SOFT1:
    // Handle left soft key.
    break;
    case ExtendedKey.SOFT2:
    // Handle right soft key
    break;
    }
}
Key.addListener(myListener);