1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 11: ActionScripting to Link Your Buttons And Scenes

By , About.com Guide

4 of 6

Accessing the "Goto" Commands

Notice that when you first insert your on (release) command, the command is followed by an opening bracket {, and then on the next line, a closing bracket }. The space between these two brackets is where we tell our movie what it's suppose to do when that on (release) command is followed. As of now we've told it to do nothing, so there's nothing there. We're going to tell it to go to the scene associated with the button and play it, using the gotoandplay command.

To do this we'll need to access the main root of this command, the goto command--which is right above the on command in our expanded menu on the left. To insert this command, you'll highlight the line that contains your on (release) command, and then double-click on goto.

Now the options to customize the command will change to display the options for goto--letting you define if you'll use a gotoAndPlay, or gotoAndStop before setting the Scene that you'll go to on this action, the type of increment/definer, and then the number/label of that increment/definition. Go to and Play is the default, and since that's what we want to do, we'll leave it at that.

In your scripting window, there should be a command that says gotoAndPlay (1) ;. With the current settings, because Flash by default uses the current scene when inserting a new command, this would rewind the movie to Frame 1 and start it over again.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Animation 11: ActionScripting to Link Your Buttons And Scenes

©2009 About.com, a part of The New York Times Company.

All rights reserved.