Goto And Play
Top  Previous  Next


Use this Action to go to another Frame, Label, or Scene. The Frame or Label can be in the same Scene or another Scene


Panels-Action-GotoFrame  

When you use the Goto And Play Action with a Frame Event, the Goto And Play happens before the Frame containing the Action is displayed.

Note: A Goto And Play Action will have no effect until the Frame it is to go to is loaded

Target
The target Movie or Sprite that the action applies to.
It is possible to start the Movie in Sprite s1 playing from Frame 10 via the command: _root.s1.gotoAndPlay(10); In which case, _root.s1 would be the target.

The target can also be a scene in the current Movie, in which case the Target Object is assumed to be the current Object.

You can specify the Frame you want to go to in one of three different ways:
·by Frame number within a Scene  
·by Frame label  
·skip a number of Frames.  

Frame

Panels-Action-GotoFrame-Number  

Select the Scene or Sprite containing the Frame you want to go to. Enter the Frame number (starting from '1') in the 'Script' Panel. You can select the Scene directly by name, or use one of the five special Scene names:
·<current scene>  
·<first scene>  
·<last scene>  
·<previous scene>  
·<next scene>  

Label

Panels-Action-GotoFrame-Label  
Select the label of the Frame you want to go to. The Frame can be anywhere in the current Movie or Sprite. You do not need to select the Scene containing the labeled Frame. See the Set Label Action.

Skip

Panels-Action-GotoFrame-Skip  

Specifies a positive or negative number of Frames to skip. For example, if set to 1 the next the Movie will go to the next Frame,
while if set to -1 the Movie will go to the previous Frame.
     
Scene
The Scene selection only appears when you select the Number option (see above). If the Goto Frame Action is targeting a sprite, then you cannot select a Scene, as Sprites do not have Scenes within them.

Play

When the Play option is selected (the default setting), the Movie or Sprite will continue playing from the Frame you specify.

Stop
When the Stop option is selected, the Movie or Sprite will display the Frame you specify and then stop.

In the example below, the Movie will jump to Frame 22 of "Scene_1" when the mouse button is pressed inside the current Object. The Movie will stop playing at the Frame you specify.

Panels-Action-GotoFrame-example