Contents

Image Buttons Play in Reverse

Script in the Timeline

This tutorial demonstrates how to add script to the timeline. To begin, recreate the basic animation from the getting started tutorial, where the circle moves from left to right.


Script in the Timeline 1

Click at frame 10 in the timeline. Right click or double click the script line to add a new script frame.


Script in the Timeline 2

The script frame is represented by a square.


Script in the Timeline 3

The script for this frame can be edited in the properties


Script in the Timeline 4

To stop the animation at frame 10. Add the script:



Stop();

Script in the Timeline 6

Add a new button, set it's text to Play and it's 'On Click' script to:


Script in the Timeline 7


Play();

Script in the Timeline 9

Add the button to the editor at frame 10.


Script in the Timeline 10

Script in the Timeline 11

Press play to test the movie. The animation will start, but stop playing at frame 10. Press the button to start playing again.


Script in the Timeline 12

Image Buttons Play in Reverse