Looping An Animation

Getting an animation to loop continuously is actually a lot easier than you might think.
Once you’ve created an animation, new animation events will become available for that animation.

For example, if I create an animation called NewAnimation, then take a look at the New Action dialog, we will see a gre.animate.complete and a gre.animate.stop event has been created for our animation:

As it sounds, the gre.animate.complete event will fire once the NewAnimation has finished animating. 

Using this event, we can simply hook onto it and call the gra.animate action to trigger the same animation, like so:

This will make it so that once the animation finishes, it triggers the same animation to begin again so it will loop continuously.

The gre.animate.stop event is fired when the animation playback is interrupted. This could be by purposefully done by say the gra.animate.stop action or by other means. So if need be you could add specific behavior to handle this case. 

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post