GSAnimator
A general purpose animation class.
Object
|
+--GSAnimator
| Constructor Summary |
| GSAnimator (<GSPoint> from, <GSPoint> to, <int> framerate, <int> duration, <Function> setvalue, <Function> onstart, <Function> onfinish) |
| Method Summary |
| void | animate() Starts the animation. |
| void | stopAnimate() Stops the animation. |
Object
duration Object
framerate Object
from Object
onfinish Object
onstart Object
setvalue Object
to GSAnimator(<GSPoint> from, <GSPoint> to, <int> framerate, <int> duration, <Function> setvalue, <Function> onstart, <Function> onfinish)
GSAnimator should not be instantiated, all of its methods are called statically.
-
from - the start position for the animation
to - the end position for the animation
framerate - the rate at which the animation frames should be drawn (in milliseconds)
duration - the length of the animation (in milliseconds)
setvalue - a user-defined function that is called every frame with a reference to the animator instance and the current position as arguments
onstart - an optional user-defined function that is called when the animation is started
onfinish - an optional user-defined function that is called when the animation has completed
Parameters:
void
animate()
void
stopAnimate()
Stops the animation. Generally there is no need to call this method explicitly as it is called by the animator itself when the animation has completed.