Remaps the soft keys of a mobile device.
When the user presses a soft key, any ActionScript associated with the soft key event is executed. The Flash Lite player executes this function immediately upon invocation. This command is supported only when Flash Lite is running in stand-alone mode. It is not supported when the player is running in the context of another application (for example, as a plug-in to a browser).
For backward compatibility with Flash Lite 1.1, the SOFT1 soft key is always mapped to the left key on the handset, and the SOFT2 soft key is always mapped to the right key on the
handset. For the SOFT3 soft key and higher, the locations are dependent on each handset.
The arguments for this command specify the text to be displayed for the corresponding soft keys. When the SetSoftKeys command is executed, pressing the left key generates a SOFT1 keypress event, and pressing the right key generates a SOFT2 keypress event. Pressing the SOFT3 through SOFT12 soft keys generates their respective events.
Note: The remapping of soft keys depends on the mobile device. Check with the device manufacturer to see if the remapping of soft keys is supported.
soft1 Text to be displayed for the SOFT1 soft key. soft2 Text to be displayed for the SOFT2 soft key.
These parameters are either names of variables or constant string values (for example, "Previous").
-1: Not supported. 0: Supported.
Availability: ActionScript 1.0; Flash Lite 1.1
The following example labels the SOFT1 soft key "Previous" and the SOFT2 soft key "Next":
status = fscommand2("SetSoftKeys", "Previous", "Next");
You can define variables or use constant string values for each soft key:
status = fscommand2("SetSoftKeys", soft1, soft2, [soft3], [soft4], ..., [softn])
Note: You can set one soft key without setting the others. These examples show the syntax
and behavior of setting a specific soft key without affecting other keys:
■To set the left soft key label to "soft1" and the right soft key to empty:
status = fscommand2("SetSoftKeys", "soft1", "")
■To leave the label for the left soft key as is and set right soft key to "soft2":
status = fscommand2("SetSoftKeys", undefined, "soft2")
■To leave the label for the left soft key as is and set the right soft key to "soft2":
status = fscommand2("SetSoftKeys", null, "soft2")
■To set the left soft key label to "soft1" and leave the right soft key as is:
status = fscommand2("SetSoftKeys", "soft1")