Macromedia flash 8-developing flash lite 2.x applications Benutzerhandbuch

Seite von 94
26
Creating Interactivity and Navigation
Using the soft keys 
(Flash Professional Only)
A device’s soft keys are multifunctional keys that use the device’s display to identify their 
purpose at any moment. For example, in the following application, labels above the soft keys 
indicate that the user can press the Right soft key to view the next dinner special, or press the 
Left soft key to return to the application’s home screen: 
To use the Left and Right soft keys, you must first call the 
SetSoftKeys
 command (see 
SetSoftKeys
 in Flash Lite 1.x ActionScript Language Reference). Subsequently, Flash Lite 
generates a 
PageDown
 event when the user presses the Right soft key and a 
PageUp
 event when 
the user presses the Left soft key. You write ActionScript event handler code that responds to 
these events and takes the desired action.
The 
SetSoftKeys
 command takes two parameters that specify the labels for the Left and 
Right soft keys, respectively, that appear when your application is not running in full-screen 
mode. For applications running in full-screen mode, the labels that you specify are not visible, 
so you must create your own labels and position them on the Stage where the soft keys 
are located. 
Soft key labels