Action Scripting Basics: Inserting a Simple Stop

01
of 02

The Purpose of a Stop Command

The stop command is most likely the most basic of all action script commands, and the most essential. A stop is basically an instruction in the ActionScript program language that tells your Flash movie to pause on a particular frame, rather than continuing to the end of the animation or cycling endlessly. Stop commands are particularly useful if you're playing an animation before pausing to wait for a user response; you would insert a stop command at the end of the animation, once the options for the user are displayed. This prevents the animation from skipping past the options without giving the user a chance to choose one.

02
of 02

Accessing ActionScripts

While ActionScripting is a programming language, Flash's library allows you to "write" in the language without actually typing the code yourself. To insert a stop at any point in your animation, simply follow these steps:

  • Create a new layer. Label it Actions, and insert a keyframe on the frame where you want your Flash movie to stop.
  • Right-click on the keyframe and select Actions. The Simple version of the ActionScript library and interface will appear, with a window that lets you view any actions currently applied to the frame as well as an expanding list of script categories.
  • Click on the Actions category to expand it, and then the Movie Controls subcategory to show the list of available commands.
  • To add a stop command, either double-click on the listing for stop or else click and drag it into the window that displays the ActionScripting for that frame. You can also click the "+" button above the window to add a new script item.

And that's it. You've added a stop command that will tell your movie to pause on that particular frame, and worked with ActionScripting for the first time.

Format
mla apa chicago
Your Citation
Sanders, Adrien-Luc. "Action Scripting Basics: Inserting a Simple Stop." ThoughtCo, Feb. 18, 2017, thoughtco.com/flash-inserting-a-simple-stop-140642. Sanders, Adrien-Luc. (2017, February 18). Action Scripting Basics: Inserting a Simple Stop. Retrieved from https://www.thoughtco.com/flash-inserting-a-simple-stop-140642 Sanders, Adrien-Luc. "Action Scripting Basics: Inserting a Simple Stop." ThoughtCo. https://www.thoughtco.com/flash-inserting-a-simple-stop-140642 (accessed November 21, 2017).