Varying the Speed of Animations

I l @ ve RuBoard

Though the frame rate for a movie is constant, you can make any particular bit of animation go faster or slower by changing the number of frames it takes to complete the action. You can lengthen a portion of an animation by adding more keyframes or by adding in-between frames. In the bouncing-ball example, you might have the ball drop down slowly (say, over the space of five frames) but have it rebound more quickly (over the space of three frames , for example). To make the smoothest animation, each of those keyframes would show the ball in a slightly different position. Adding keyframes, however, increases file size. Sometimes, you can get away with simply adding in-between frames to slow the action. In-between frames add little to the exported movie's file size .

To add in-between frames:

  1. Open (or create) a five-frame bouncing-ball movie.

    Frame 1 is a keyframe showing the ball at the top of the Stage, frames 2 and 3 are keyframes showing the ball at two places in its descent, Frame 4 shows the ball at the bottom of the Stage, and Frame 5 shows the ball bouncing halfway back up. (For step-by-step instructions, see the exercises in "Smoothing the Animation by Adding Keyframes" earlier in this chapter.)

  2. From the File menu, choose Save As, and make a copy of the file.

    Give the file a distinguishing name , such as Bounce Slower.

  3. In the copy's Timeline, select Frame 1.

  4. From the Insert menu, choose Frame (or press F5 on the keyboard).

    Flash inserts an in-between frame at Frame 2 and pushes the keyframe that was there to Frame 3 (Figure 8.43).

    Figure 8.43. Select a frame and press F5 (top); Flash inserts an in-between frame directly after the selected frame (bottom).

    graphics/08fig43.gif

  5. Repeat steps 3 and 4 for the second and third keyframes in the movie.

    You wind up with keyframes in frames 1, 3, 5, 7, and 8 (Figure 8.44).

    Figure 8.44. With in-between frames separating the initial keyframes, the first part of the animation moves at a slower pace than the second.

    graphics/08fig44.gif

  6. From the Control menu, choose Test Movie.

    Flash exports the movie to a .swf file and opens it in Flash Player. You can see that the action in the movie with added inbetween frames feels different from the action in the one in which one keyframe directly follows another.

graphics/01icon02.gif Tip

  • Keep in mind that this example serves to illustrate a process. In most animations, you would not want to overuse this technique. If you simply add many in-between frames, you'll slow the action too much and destroy the illusion of movement.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

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