6.
Assign the instance names of menu_2 and menu_3 to the middle and lower movie
clips, respectively.
The numeric suffix appended to each instance name lets you dynamically refer to each
movie clip in code, which you'll add shortly.
7.
Using the Text tool, create a text field along the lower edge of the Stage.
8.
In the Property inspector, select Dynamic from the Text Type pop-up menu, and type
status in the Var text box.
As in the simple menu example, this text field displays a status message about the menu
item that is currently selected.
9.
In the Timeline, select the first frame on the layer named Actions.
10.
Open the Actions panel (Window > Actions), and enter the following code:
// Initialize menu item labels:
menu_1.label = "News";
menu_2.label = "Sports";
menu_3.label = "Weather";
// Initialize variable that specifies number of menu items
numItems = 3;
// Initialize selectedItem variable, which contains
// the index of the current menu selection
selectedItem = 1;
// Initialize status text field
currentLabel = eval("menu_" add selectedItem add ":label");
status = "Press to select " add currentLabel;
// Send the first menu item to its "over" state
tellTarget("menu_1") {
gotoAndStop("over");
}
11.
In the Timeline, select the layer named Key Catcher.
18
Creating Interactivity and Navigation
menu_1
menu_2
menu_3
Need help?
Do you have a question about the FLASH 8-DEVELOPING FLASH LITE and is the answer not in the manual?
Questions and answers