Actionscript 2.0 Codes

The following is a number of Actionscript 2.0 codes that might be useful when working with Flash:


To keep animation from playing

To make sure your animation does not play when it starts.

To make sure the animation stops at a particular frame.


To keep animation playing

To make sure your animation keeps playing and skips the STOP frame.

To make sure the animation goes to a particular frame and plays.

34

To add a PLAY BUTTON

Add this Actionscript to a PLAY button to make sure your animation continues


To add a STOP BUTTON

Add this Actionscript to a STOP button to make sure your animation does not continue to the following frame.


To go to the NEXT FRAME

Add this Actionscript to a NEXT button to make sure the animation moves to the next frame.



To go to the PREVIOUS FRAME

Add this Actionscript to a BACK button to make sure the animation moves to the previous frame.


To go to an SPECIFIC FRAME

Add this Actionscript to a button to make sure the animation moves to an specific frame.

Make sure to replace the x with the number of the frame you would like the animation to go.

Choose between Play and Stop depending on whether you want the animation to start playing or not when it arrives at that frame.


To go to an SPECIFIC SCENE

Add this Actionscript to a button to make sure the animation goes to an specific scene.

Replace sceneName with the name of the Scene.

The 1 represents the frame of the scene in which the animation will start. Change the number if you want it to go to an specific frame within the scene.

Choose between Play and Stop depending on whether you want the animation to start playing or not when it arrives at that scene.