Hands-On: Flash MX 2004 Movie Clips
Exercise 30: Creating the “ActionScript” Links for the Website
Create the ActionScript for the links once, do it correctly and you won’t
be spending any “debugging time”. It will be necessary to name your
Movie Clip links to something simple and easy to remember, for this exercise
follow my steps first for practice.
Note: Flash MX 2004 ActionScripting has been changed drastically from the
previous version of Flash MX, so take your time relearning the steps if you are
used to a former version of Flash.
Follow these steps:
- Continue or re-open the previous exercise main-interface-done.fla
- In the navbar layer, click once on the LINK 1 button to select
it.
- In the Instances textbox, type link1 for the name.
- Press [F9] to open the Actions Panel.
Choose Global
Functions > Movie Clip Control >on and then double-click release.

- Click to the right of the code on ( ) { and thenhit the [Enter] key.Next choose Global Functions > Timeline Control >gotoAndStop.
- In the parentheses ( ) type the following "link1", 1,
this telling Flash to stop on the first frame of the link 1 Timeline.
- Click on the second Button and repeat the above steps, but inside the parentheses type “link2”, 1. (Or whatever you
will name your Scene 2, 3, 4 and so on.)
- Repeat this procedure until all the links have their own ActionScripts. For example: ("link2", 1), and ("link3", 1) and so on.
- Repeat this procedure for the HOME button, except it will read (“main”, 1).


|