Chapter 3. Animate Your Art

In the olden days of animation, artists had to create a drawing for each frame of a movie by hand. Sure, they had their shortcuts, but since most movie frames click by at 24 frames per second, that's a labor-intensive endeavor. To keep costs down, animation production companies had their best, highest-paid artists draw the most important images, where major changes took place, and then had lesser talents and beginners draw the in-between images. Those most important images are known as keyframes. The in-betweeners are called tweens.

This chapter is your introduction to keyframes and tweens from Flash's point of view. In this case, you're the high-paid artist who gets to create the keyframes, while your computer does the grunt work of drawing all the tweens. You'll learn about two types of tweens—the motion tween and the shape tween. But first, you need to understand the various types of frames you see in Flash's timeline.

Note

"Tween" is one of those words that makes you smile—it just sounds funny. It's even funnier when you realize that it's used as both a noun and a verb. Not only can you create a tween, but you can also tween a drawn object, such as a car. ("I tweened the car to make it drive down the road.")

An animation is nothing more than a series of framed images displayed one after the other to create the illusion of motion. If you want to, you can use Flash to make your animation the old-fashioned way, by drawing each frame individually. Whether you animate frame by frame or use computer-generated tweens, you need to be able to decode the timeline symbols to understand how your animation works. Figure 3-1 shows some of the hieroglyphics you'll find on the timeline. Here are some more details:

As you work with your animation, you use the playhead to manage time and build your animation. Drag the playhead to Frame 15, and you see the contents of the stage at that moment in time.

Flash lets you animate virtually any visible object you place on the stage. You can animate cartoon-style drawings, photos, videos, or even text.

Follow these steps to see how frame-by-frame animation works:

  1. Open a blank Flash document by choosing File→New and then selecting ActionScript 3.0 and pressing OK.

    You have a spanking new Flash document. As the timeline in Figure 3-2 shows, Flash starts you out in Layer 1, Frame 1, because initially, a Flash document has only one frame, a keyframe at Layer 1, Frame 1.

    The red rectangle over Frame 1 is the playhead. It marks the current frame—the one displayed on the stage. When you begin a new document, you can't move the playhead until you add more frames, as described in step 3.

  2. Using Flash's paint and drawing tools, draw an image on the stage.

    Figure 3-3 shows an example drawing of a frog with a tempting fly overhead, but you can use any drawing or shape for this exercise. As soon as you add a drawing or any visual content to a keyframe, the hollow circle fills in, becoming a solid circle. The hollow circle marks an empty keyframe (no content). The solid circle marks a keyframe with content—in other words, there are graphics displayed on the stage.

  3. In the timeline, click the rectangle under the number 20.

    Flash highlights the rectangle, as shown in Figure 3-4. Notice that the playhead doesn't move, because at this point your animation contains only one frame.

  4. Turn the selected frame into a blank keyframe by pressing F7.

    Flash moves the playhead to the selected frame (Frame 20 in Figure 3-4), inserts a keyframe icon, and clears the stage.

  5. Draw a second image on the stage.

    The second keyframe in Figure 3-5 shows the frog drawn again, with a thought balloon instead of a fly. But if your two images are fairly similar, then you can avoid having to completely redraw the image for your second keyframe, as you'll see in the next step.

  6. Click further out in the timeline (Frame 40, say), and press F6.

    Just as when you inserted the blank keyframe, Flash moves the playhead and inserts a keyframe icon; but instead of clearing the stage, Flash carries over the content from the previous keyframe, all ready for you to tweak and edit.

  7. Repeat the previous step to create as many keyframes as you want.

    To get the hang of frame-by-frame animation, adding two or three keyframes is plenty. But when you're building an actual animation, you'll likely need to add dozens or even hundreds of keyframes (or even more, depending on the length and complexity you're shooting for).

Adding frames, keyframes, and blank keyframes is a recurring activity as you work in Flash. As explained in the note on Note, you can use menus to do the job, but it's faster and easier to remember the three function keys that do the job:

  • F5: Insert a frame.

  • F6: Insert a keyframe.

  • F7: Insert a blank keyframe.

Sooner or later you want to test your animation. Sometimes you want to take a quick peek at a few frames to see if the mechanics are in order. Other times you want to review the entire animation exactly the way your audience will see it. Flash has options for both situations: