To jump to a specific frame or scene in the movie, you use the goto
action. When the movie jumps to a frame, you can choose parameters that either play the movie from the new frame (the default) or stop at the frame. In expert mode, the goto
action is listed as two actions in the Actions toolbox: gotoAndPlay
and gotoAndStop
. The movie can also jump to a scene and play a specified frame or the first frame of the next or previous scene.
To jump to a frame or scene:
goto
action.Flash inserts the gotoAndPlay
action in the Script pane.
If you select Next or Previous, the playhead jumps to the first frame in the next or previous scene. If you select the current scene or a scene that you have named, you must provide a frame for the playhead to jump to.
1 + 1
.The following action jumps the playhead to frame 50, where play continues:
gotoAndPlay(50);
The following action jumps the playhead to a frame that is five frames ahead of the frame that contains the action:
gotoAndStop(_currentframe + 5);
For more information on writing expressions, see Using operators to manipulate values in expressions.
For more information about using the Actions panel in normal and expert modes, see Creating Interaction with ActionScript.