The Actions panel is a script wizard, text editor, and code-checker, all in one. To open the Actions panel, choose ‘Window > Actions’, or press F9 (Windows) or Option+F9 (Mac OS). On many laptops, you will need to add the function (fn) key: Fn+Option+F9.
Code Snippets allow us to get up-and-running with ActionScript quickly and easily. Open your project with morphing shapes; export and playback the movie. You’ll notice that it continually loops over and over. Let’s use ActionScript to stop the playback at the end of the movie.
Select the final frame of the animation. Open the Code Snippets and select the ‘Timeline Navigation’ options and ‘Stop at this Frame’. This will add a statement called stop(); at the end of the movie. Test the movie. Note that it now stops at the end of the movie.
Create a brand new project. Add three button ‘Components’, naming the three ‘Red’, ‘Green’ and ‘Blue’. Place a large box in the background with the colour red. Create a new keyframe with the box colour changed to green. Create a final keyframe with the box colour changed to blue. Test the playback; what happens with the movie?
Use ‘Code Snippets’ to make the movie work correctly. Remember, you’ll need to stop the movie on the first frame before you add the other actions, else you’ll still have issues with playback.