• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter FOUR. HILLMANCURTIS.com NAVIGATI... > STEP 06 scripting the movie clip FOR...

STEP 06 scripting the movie clip FOR ROLLOFF ACTION

Now that you've created the loop action for one film clip it's time to do the same for the second clip. Because this clip will play only when the user's pointer rolls over the button and then stop when it rolls off, there are a few variations in the technique.

Open the second movie clip for editing.

In all layers, insert a blank keyframe at frame 1. You should already have blank keyframes in the actions and labels layers since by default flash puts a blank keyframe in frame one of any layer. To add the blank keyframe in the daveloop layer, select all of the keyframes and click and drag them, as a unit, one frame to the right as shown in figure 04:16.

Figure 04:16.

Add a frame (using the keyboard shortcut F5) at the end of both the labels and actions layers so that all of the labels have an equal number of frames.

In the labels layer, insert a label in frame 1 named davestop or something similar…since Dave is somewhat of a freak, I guess I could have called the label freakstop…but let's stick with davestop.

In frame 2 of the label layer, insert a second label titled daveloop.

In the actions layer, double-click the blank keyframe on frame 1 to open the Frame Properties dialog.

From the Action tab, choose Stop from the Add Action list. Click OK. This keyframe is used to stop the movie from playing until explicitly activated.

On the last frame of the action layer, insert a blank keyframe (using the keyboard shortcut F7), double-click the blank keyframe, and add a Go To action. Set the label target to the daveloop label, making sure to select the Control: Go To and Play option from the Frame Properties dialog as shown in figure 04:17. Click OK.

Figure 04:17.

So here's where we're going with this…filmclip 1 will be looping from the moment the movie loads on the web page, but on the layer right above filmclip1 is daveclip1, invisible because we have stopped daveclip1 on a blank frame (as shown earlier). When the user rolls over, we will tell filmclip1 to go to the label called filmstop, which is all blank frames (filmclip disappears) and at the same time we'll tell daveclip1 to start playing (daveclip appears). So…filmclip1 stops playing…daveclip1 starts. Confused enough yet?…Don't be; stay with me here as we add the button that will command all of this….

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint