Flash CS3 Documentation |
|||
| Getting Started with Flash Lite 1.x > Creating a Flash Lite Application > Creating the application > Creating the menu for the main screen | |||
In this section, you'll create the menu for the application's main screen. The menu consists of two options: Specials and Reservations. The Specials option takes the user to a screen to view images and descriptions of specials at the cafe. The Reservations option initiates a phone call to the cafe so that the user can make reservations.
The menu consists of two standard Flash buttons that define up, over, and down states. The user gives focus to one of the buttons by pressing the Up or Down Arrow keys on their device. When a button has focus it displays its over state. The button that has focus generates a button press event when the user presses the Select key on the device. This default tab navigation provides an easy way to create a simple user interface for a Flash Lite application. For more information about using tab navigation, see Using tab navigation in Flash Lite in Developing Flash Lite 1.x Applications.
Position the button beneath the text field (already in place) that introduces the restaurant.
on(press) {
gotoAndStop("specials");
}
This event handler code sends the playhead to the frame labeled specials when the user selects this button. You'll create the content for that frame in the next section (see Creating the specials screen).
on(press) {
getURL("tel:1-415-555-1212");
}
When the user selects the Reservations menu item, Flash Lite initiates a phone call to the specified number. Flash Lite always prompts the user to allow or deny a request from a SWF file to dial a number. For more information, see Initiating a phone call in Learning Flash Lite 1.x ActionScript.
stop();
_focusRect = false;
fscommand2("resetsoftkeys");
fscommand2("setquality", "high");
fscommand2("fullscreen", "true");
This code does the following:
When the Specials button item gets focus, you will see the button's over state.
At this point, the specials screen contains no features. In the next section, you'll add interactivity and animation to create the specials screen (see Creating the specials screen).
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00005631.html