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.
Содержание FLASH 8-GETTING STARTED WITH FLASH LITE
Страница 1: ...Getting Started with Flash Lite ...
Страница 4: ...4 Contents ...
Страница 8: ...8 Introduction ...
Страница 24: ...24 Flash Lite Overview ...
Страница 42: ...42 Index ...