gotoAndStop()

Availability

Flash 2.

Usage

gotoAndStop([scene,] frame)

Parameters

scene An optional string specifying the name of the scene to which the playhead is sent.

frame A number representing the frame number, or a string representing the label of the frame, to which the playhead is sent.

Returns

Nothing.

Description

Function; sends the playhead to the specified frame in a scene and stops it. If no scene is specified, the playhead is sent to the frame in the current scene.

Example

When the user clicks a button that gotoAndStop() is assigned to, the playhead is sent to Frame 5 in the current scene and the SWF file stops playing.

on(release) {
  gotoAndStop(5);
}

See also

stop()