Making It Move with Motion Tweens

There are a lot of fun things you can do in Flash, but one that's sure to put a smile on your face is the motion tween. Using the motion tween, it's surprisingly easy to make the objects in your animation move, change shape, change color, or fade to nothingness. The first step is to convert the graphics you want to tween to Flash symbols; then you can change the properties of the symbols at any given point in time—or more specifically, at any point along the timeline. For example, if you have a redwood tree and you want to make it grow, you'd change the height (H) property. For example, in Frame 12, you can set the H property to, say, 100 (pixels), then set it to 150 in Frame 24, 200 in Frame 36, and so on. The tree appears to grow before your audience's eyes. Want to move a car across the stage? Just change the X and Y properties, which set the position on the stage, to create the illusion of movement. (For a rundown on the X/Y coordinate system, see the box on Use X/Y Coordinates to Set Stage Position.)

Chapter 1 showed you how to apply the bounce-smoosh motion preset to a wheel symbol. Motion presets are motion tweens that are predesigned to create certain effects. In the case of bounce-smoosh, it made the wheel drop from the top of the stage to the bottom. When it hit ground, it squashed like a cartoon character and then bounced a couple of times until it came to rest. In the next few exercises, you will create your own version of the bounce-smoosh ...

Get Flash CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.