STEP 05 importing sequential bitmaps into FlashCREATING MOVIECLIP 2


Use the same import process described to create movieclip1 to create your second movieclip. Because the second movie clip will appear when the button is rolled-over by the user 's pointer, you'll obviously want to select a noticeably different piece of video. For the hillmancurtis.com navigation buttons I chose a video of an eye opening. For this re-creation, I used a portion of a video I shot with my digital camcorder of a friend, Dave Hartt. I named this symbol "daveclip1" (see figure 04:12).


Figure 04:12.

graphics/04fig12.jpg


scripting the loop action FOR MOVIECLIP 1

Each of the video clips by itself lasts no more than a second, if that. For them to always be playing, the clips must loop continuously. In Flash, we can create a loop by using a "go to and play" action that sends the playhead back to the beginning of the sequence when it reaches the end of that sequence. As always, I place this action in the separate layer that I have created and titled "actions."

I also use Flash's label facility as much as possible. Not only does this give me an overall understanding of what's happening when, but it also simplifies the programming process. Rather than refer to a frame number when building an action, I reference a label previously placed in my label layer.

  1. Open the editor for the initial movie clip, filmclip1, by double-clicking on it in the symbol library.

  2. In the labels layer, double-click the keyframe in Frame 1 to open the Frame Properties dialog.

  3. In the Label tab of the Frame Properties dialog, enter filmstart or something similar. Click OK .

    Be sure that the Label option is selected; a Flash Comment cannot be used in programming actions (see figure 04:13).


    Figure 04:13.

    graphics/04fig13.jpg


  4. Add an extra blank keyframe (use the keyboard shortcut F7) in all of the layers after the last frame of the sequence (see figure 04:14). In the labels layer, double-click on that blank keyframe and give it a title like filmstop.


    Figure 04:14.

    graphics/04fig14.jpg


    The idea here is that when the user rolls over the button, the playhead will be instructed to go to frame label "film stop" and stay there while the movie clip of Dave plays.

  5. In the action layer, insert a keyframe in the second-to-last frame of the movie clip and double-click it to open the Frame Properties dialog.

  6. From the Actions tab, select the Add Action button (the plus sign) and choose Go To from the list.

    The action panel on the right side of the dialog displays the options for the selected action.

  7. Choose the Label option and select the label representing frame 1, in this case "filmstart."

  8. Select the Control: Go To and Play option at the bottom of the dialog (see figure 04:15). Click OK.


    Figure 04:15.

    graphics/04fig15.jpg




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