Proportional Motion

Easing and springing are closely related . Even though I had planned from the beginning to put these two subjects in the same chapter, it wasnt until I sat down to plan this chapter in more detail that I realized just how similar they are to each other.

Both techniques involve moving a movie clip from an existing position to a target position. In easing, the clip kind of slides into the target and stops. In springing, the clip bounces around back and forth for a bit, and then finally settles down at the target. The two techniques have the following in common:

  • You set a target.

  • You determine the distance to that target.

  • Your motion is proportional to that distancethe bigger the distance, the more the motion.

The difference between easing and springing is in what aspect of the motion is proportional. In easing, velocity is proportional to the distance; the further away from the target, the faster the object moves. As it gets very, very close to the object, its hardly moving at all.

In springing, acceleration is proportional to the distance. If the object is far away from the target, a whole lot of acceleration is applied, increasing the velocity quickly. As the object gets closer to its target, less acceleration is applied, but its still accelerating! It flies right past the target, and then acceleration pulls it back. Eventually, friction causes it to settle down.

Lets dive in to each technique separately, starting with easing.



Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

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