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.

  1. Open the second movie clip for editing.

  2. 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.

    graphics/04fig16.jpg


  3. 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 .

  4. In the labels layer, insert a label in frame 1 named davestop or something similarsince Dave is somewhat of a freak, I guess I could have called the label freakstopbut let's stick with davestop.

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

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

  7. 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.

  8. 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.

    graphics/04fig17.jpg


So here's where we're going with thisfilmclip 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). Sofilmclip1 stops playingdaveclip1 starts. Confused enough yet?Don't be; stay with me here as we add the button that will command all of this.



Flash Web Design The Art Of Motion Graphics
Flash Web Design oder: the art of motion graphics
ISBN: 3827256623
EAN: 2147483647
Year: 2005
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net