Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Specific Language Elements > Capabilities > _cap4WayKeyAS | |||
Flash Lite 1.1.
_cap4WayKeyAS
Numeric variable; indicates whether Flash Lite executes ActionScript expressions attached to key event handlers associated with the Right, Left, Up, and Down Arrow keys. This variable is defined and has a value of 1 only when the host application uses four-way key navigation mode to move between Flash controls (buttons and input text fields). Otherwise, this variable is undefined.
When one of the four-way keys is pressed, if the value of this variable is 1, Flash Lite first looks for a handler for that key. If it finds none, Flash control navigation occurs. However, if an event handler is found, no navigation action occurs for that key. For example, if a key press handler for the Down Arrow key is found, the user cannot navigate.
The following example sets canUse4Way to 1 in Flash Lite 1.1, but leaves it undefined in Flash Lite 1.0 (however, not all Flash Lite 1.1 phones support four-way keys, so this code is still dependent on the phone):
canUse4Way = _cap4WayKeyAS;
if (canUse4Way == 1) {
msg = "Use your directional joypad to navigate this application";
} else {
msg = "Please use the 2 key to scroll up, the 6 key to scroll right, the 8 key to scroll down, and the 4 key to scroll left.";
}
|
|
|
|