User Guide
Table Of Contents
- Contents
- Introduction
- Flash Lite Overview
- About Flash Lite technology
- Flash Lite 1.x availability
- About Flash Lite content types
- Workflow for authoring Flash Lite applications (Flash Professional Only)
- Flash Lite authoring features in Flash Professional 8 (Flash Professional Only)
- Using Flash Lite document templates (Flash Professional Only)
- Hello World Flash Lite application (Flash Professional Only)
- About the stand-alone Flash Lite player
- Creating a Flash Lite Application (Flash Professional Only)
- Café application overview (Flash Professional Only)
- Viewing the completed application (Flash Professional Only)
- Creating the application (Flash Professional Only)
- Index
Creating the application (Flash Professional Only) 31
6. Add the following code to the Actions panel:
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
(Flash Professional Only)” on page 32).
7. On the Stage, select the Reservations button and open the Actions
panel
again.
8. In the Actions panel, enter the following code:
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 Developing Flash Lite
Applications.
9. In the Timeline, select Frame 1 on the Actions layer.
10. Open the Actions panel and enter the following code:
stop();
_focusRect = false;
fscommand2("resetsoftkeys");
fscommand2("setquality", "high");
fscommand2("fullscreen", "true");
This code does the following:
■ Stops the playhead at this frame.
■ Disables the yellow focus rectangle that Flash Lite draws by default
around the button or input text field with the current focus (see
“About the focus rectangle” in Developing Flash Lite Applications.
■ Resets the soft keys to their default state. (Later in the tutorial,
you’ll add code that registers the soft keys for your application
to
use.)
■ Sets the player’s rendering quality to high. By default, Flash Lite
renders graphical content at medium quality.
■ Forces the player to display the application full screen.