2009

Table Of Contents
The flattened Balloons scale increases along its Y-axis. It inflates as the
animation plays.
At 2 seconds and thereafter, Balloon no longer inflates.
When time equals 2 or more, the if condition is no longer true. The
statement that follows it, Balloon.scaleY = time, no longer executes. The
value of the scaleY attribute stays at the last value it had before time
became 2, specifically, 1.9583.
Recall that this example uses a frame rate of 24 frames per second. The
time and Balloon.scaleY have these values at various frames:
Balloon.scaleY (time)Time (seconds)Frame
000
0.04170.04171
0.08330.08332
0.1250.1253
1.01.024
1.95831.9647
1.95832.048
1.95832.0449
The if statements condition, (time < 2), is a comparison. The condition
must be surrounded by parentheses to isolate it from assignment that
follows it.
576 | Chapter 12 Expressions