Exercise 5 has a flash file emulating a web site where one clicks on navigational links and sees different content. In Exercise 5, the content of each "web site page" is put in a different scene. ActionScript is added to the first scene so that the movie stops at the outset. The navigational buttons for the home page are Flash button symbols; each is programmed with ActionScript so that when one clicks on the button, one goes to the scene corresponding to the button. Since these buttons are all in a single layer with no other content in the layer. one can select all the buttons by selecting the layer, and then one can choose edit>TimeLine>Copy Frames to copy and then to paste to the other scenes.
To give the user a sense of where they are, it is common in web pages for the link to the current page to be deactivated. This is accomplished in Exercise 5 by converting the instance of the appropriate button symbol from a button to a graphic symbol. Since ActionScript cannot be attached to a graphic symbol, this means that the button is no longer clickable and no longer will a hand symbol appear if one cursors over the symbol. Since the upstate of the button contains a triangle, changing the tint of the instance of the symbol to White makes the triangle visible and gives an indication of where one is.
In Exercise 6, the navigational buttons are again Flash button symbols, but this time they are all part of a movie clip symbol. Instead of different scenes as in exercise 5, now all the different variations of the navigation bar across the various "pages" are inside the movie clip. Instead of referring to different frames within the movie clip by number, these frames within the movie clip are given labels, so that one can refer to the these frames by name in ActionScript rather than by number. This makes the code easier to read and more robust (in case pages are deleted or inserted).
In Exercise 5, the a particular instance of a button symbol was altered when the button referred to the "current page". In Exercise 6, an instance of the button symbol within the movie clip symbol is changed, just like before, so that it no longer functions as link and one can program a change in appearance as well for the up state.
Revised: April 19, 2007. Comments to Bill Pegram, bill@billpegram.com