Easing Tweens

When Flash creates a tween, it doesn't use an artist's eye; it uses an accountant's calculator. If a cartoon roadrunner sprints across the desert, it moves exactly the same distance in each frame, even though we all know that cartoon roadrunners start slowly, build up speed, and then slow as they skid to a stop, usually with a little thwang motion at the end. It's up to you to add realistic (or, if you prefer, cartoonistic) motion to your animations, and fortunately, the Ease tools are there to help. When you apply an ease to one of the properties in your tween span, Flash recalculates how much of a change takes place in each frame. Suppose you want an object, like a moving car, to roll gradually to a stop. You can apply an ease that makes the car move farther in the first few frames, and then shorter distances in the final frames until it stops, as shown in Figure 8-20.

These two tweens are onion-skinned to show the car in several different frames. The tween on the top has no ease. The Fast ease was applied to the tween on the bottom.

Figure 8-20. These two tweens are onion-skinned to show the car in several different frames. The tween on the top has no ease. The Fast ease was applied to the tween on the bottom.

Applying an Ease Preset

Flash comes with several ease presets, as shown in the menu in Figure 8-21. Ease presets aren't limited to changing the position of an object; you can apply them individually to specific properties. For example, if you have a lamp shining a yellow light, you can make that light blink on and off by applying ...

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.