Game Development Reference
In-Depth Information
Hey, is that not enough for you? You're far from done yet! The Psaaj class also has many methods
that you can use to control the animation in exactly the same way you can control an animation in the
timeline. Table 10-4 shows methods you can use with your Psaaj objects.
Table 10-4. Tween class methods
Tween method name
What it does
opkl$%7
Stops the animation at its current position.
op]np$%7
Starts the animation from its beginning point.
_kjpejqaPk$%
Tells the animation to continue from its current position to a new finish
point with a new duration.
Takes two arguments: the new finish point and the new duration. You
could use it like this:
psaaj*_kjpejqaPk$-1,(.,%7
You can use _kjpejqaPk to alter the direction and duration of an anima-
tion after it has started.
bbkns]n`$%
Fast forwards the animation directly to the end.
lnarBn]ia$%
Plays the previous frame in the animation.
naoqia$%
Resumes the animation after it's been stopped using the opkl$% method.
nasej`$%
If the animation is playing, rewinds it to the beginning and starts it playing
once more. If the animation has been stopped, the animation is rewound
to the beginning but not restarted.
ukuk$%7
Plays the animation back in reverse. It's usually used in conjunction with
the IKPEKJ[BEJEOD event from the PsaajArajp class.
You can use any of these methods the same way you use methods in other classes, like this:
[psaaj*op]np$%7
[psaaj*ukuk$%7
I won't go into any of these properties or methods in any detail, but there's quite a treasure trove of
material here to keep a creative programmer busy for a long, long time. And you'll soon see that using
properties and methods from the Psaaj class is often easier and quicker than creating animations
manually on the timeline.
 
Search Nedrilad ::




Custom Search