2009

Table Of Contents
Editing expressions to refine an animation
You can further refine the animation by expanding Balloon more slowly.
To edit the expression to scale the balloon more slowly
1 Change the expression to this:
if (time < 2)
{
Balloon.translateY = 0;
Balloon.scaleY = time * 0.6;
}
else
Balloon.translateY = time - 2;
(The asterisk (*) multiplies time by 0.6.)
2 Click Edit.
3 Play the animation.
The scaleY attribute increases at 60% of the value of time, so Balloon
expands slower during playback. (The number 0.6 equals 60%.) By the
time Balloon starts to rise, it has expanded to the size of a typical balloon.
To know whether to multiply time by 0.6 or some other number, you
need to experiment.
For example, you might multiply by various percentages such as 0.2, 0.5,
0.75, and finally 0.6. The 0.6 creates a life-like balloon shape at two
seconds.
4 Stop the animation and go to the start time.
You can further refine Balloons appearance by eliminating the flattened
Balloon that appears at the origin when you go to the start time. You can also
scale Balloon at different rates along each of its three axes.
582 | Chapter 12 Expressions