H  24  25  26  27  28  29  30  31 

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:

  1. Continue or re-open the previous exercise main-interface-done.fla
  2. In the navbar layer, click once on the LINK 1 button to select it.
  3. In the Instances textbox, type link1 for the name.
  4. Press [F9] to open the Actions Panel.
  5. Actions to use. Choose Global Functions > Movie Clip Control >on and then double-click release.
    Actions from the Actions Panel
  1. Click to the right of the code on ( ) { and thenhit the [Enter] key.Next choose Global Functions > Timeline Control >gotoAndStop.
  2. In the parentheses ( ) type the following "link1", 1, this telling Flash to stop on the first frame of the link 1 Timeline.
  3. 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.)
  4. Repeat this procedure until all the links have their own ActionScripts. For example: ("link2", 1), and ("link3", 1) and so on.
  5. Repeat this procedure for the HOME button, except it will read (“main”, 1).

Button Actions

 

Back to Top