Class GSAnimator

A general purpose animation class.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSAnimator(from, to, framerate, duration, setvalue, onstart, onfinish)
Constructs a new GSAnimator instance
Method Summary
Method Attributes Method Name and Description
 
Starts the animation.
 
Stops the animation.
Class Detail
GSAnimator(from, to, framerate, duration, setvalue, onstart, onfinish)
Constructs a new GSAnimator instance
Parameters:
{GSPoint} from
the start position for the animation
{GSPoint} to
the end position for the animation
{int} framerate
the rate at which the animation frames should be drawn (in milliseconds)
{int} duration
the length of the animation (in milliseconds)
{Function} setvalue
a user-defined function that is called every frame with a reference to the animator instance and the current position as arguments
{Function} onstart
an optional user-defined function that is called when the animation is started
{Function} onfinish
an optional user-defined function that is called when the animation has completed
Method Detail
animate()
Starts the animation.

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.

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:27 GMT+1300 (NZDT)