Game Development Reference
In-Depth Information
Properties and methods of the Tween class
Each argument also represents a property in the Psaaj class. Table 10-2 is a plain-English breakdown
of what the arguments are, what they tell the [psaaj object, and which Psaaj class properties that
they refer to.
Table 10-2. Tween class properties
Argument
What it tells the Tween
object
Tween class
property it
represents
Kind of information it can
contain
nk^kp
k^f
Use the nk^kp object on the
stage for the animation.
Any object—it does not just
have to be a display object.
You can even use the Psaaj
class to “animate” numerical
data if you want to.
t
lnkl
You want to animate the
robot's t property.
The string that represents the
property you want to animate.
It can be any property at all; it
doesn't just have to be an t or
u property.
Nacqh]n*
a]oaEjKqp
The formula that you'll use to
animate the robot is Nacqh]n*
a]oaEjKqp, which is part of
the a]oejc package you
imported earlier.
bqj_
The easing formula used to
animate the object.
nk^kp*t
The starting position for the
robot is the robot's t position.
^acej
The value where you want
to start the animation. This
should be a Jqi^an.
01,
The finish position on the
stage is position number 450.
Because you're animating the
object's t position, this refers
to an t value of 01,.
bejeod
Where you want the anima-
tion to end; it should also be
a Jqi^an.
2,
The duration of the anima-
tion: 60 frames.
`qn]pekj
A number that indicates how
long the animation lasts. It can
represent seconds or frames.
b]hoa
qoaOa_kj`o
Tells the Psaaj object that the
duration should be in frames,
not seconds.
A Boolean value that deter-
mines whether the duration
should be measured in frames
or seconds. If pnqa, seconds
are used; if b]hoa, frames are
used.
 
Search Nedrilad ::




Custom Search