User Guide
Table Of Contents
- Contents
- Introduction
- Flash Lite Overview
- Hello World Flash Lite application (Flash Professional only)
- Flash Lite authoring features in Flash Professional 8 (Flash Professional only)
- Workflow for authoring Flash Lite applications (Flash Professional only)
- About Flash Lite content types
- Creating a Flash Lite document template (Flash Professional only)
- Tutorial: Creating a Flash Lite Application (Flash Professional Only)
- Cafe application overview (Flash Professional only)
- View the completed application (Flash Professional only)
- Create the application (Flash Professional only)
- Index

Create the application (Flash Professional only) 41
7. Repeat step 6 for the two buttons in the library named location_PA and
location_BK and give them instance names of pa_btn and bk_btn,
respectively.
The Stage of your application should look something like the following
example:
8. In the Actions panel (Window > Actions), enter the following code:
stop ();
fscommand2 ("SetSoftKeys", "Save", "Cancel");
showCurrentLocation();
//
// Soft key event handler code
//
Key.removeListener (myListener);
var myListener:Object = new Object ();
myListener.onKeyDown = function () {
var keyCode = Key.getCode ();
if (keyCode == ExtendedKey.SOFT1) {
// Save location:
saveNewLocation ();
gotoAndPlay ("home");
}
else if (keyCode == ExtendedKey.SOFT2) {
// Cancel operation, go back to home screen:
gotoAndPlay ("home");
}
};
Key.addListener (myListener);
//
// Function: saveNewLocation().
//
function saveNewLocation () {
// Determine which button (location) the user selected:
var selectedButton = Selection.getFocus ();
switch (selectedButton._name) {
case "sf_btn" :
sf_btn
sj_btn
pa_btn
bk_btn