3.
Create another static text field named Right, and position it in the lower-right corner of
the Stage, above the right soft key on the device.
4.
Using the Text tool, create a dynamic text field, and position it in the middle of the Stage.
Your document's Stage should look like the following example:
5.
With the dynamic text field still selected, in the Property inspector, type status in the
Instance Name text box.
6.
Open the Actions panel (Window > Actions) and, in the Timeline, select Frame 1 in
Layer 1.
7.
In the Actions panel, type the following code:
fscommand2("SetSoftKeys", "Left", "Right");
fscommand2("FullScreen", true);
8.
Create and register an object to respond to keypress events (see
handle keypress events (Flash Professional only)" on page
code in the Actions panel:
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == ExtendedKey.SOFT1) {
// Handle left soft keypress event.
status.text = "You pressed the Left soft key.";
} else if (Key.getCode() == ExtendedKey.SOFT2) {
// Handle right soft keypress event.
status.text = "You pressed the Right soft key.";
}
};
Key.addListener(myListener);
Dynamic text field
Soft key labels
Handling key and button events (Flash Professional only)
"Using a key listener to
28) by entering the following
31
Need help?
Do you have a question about the FLASH 8-DEVELOPING FLASH LITE 2.X and is the answer not in the manual?
Questions and answers