gotoAndPlay()

Availability

Flash Lite 1.0.

Usage

gotoAndPlay([scene,] frame)

Operands

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.

Description

Function; sends the playhead to the specified frame in a scene and begins playing from that frame. If no scene is specified, the playhead moves to the specified frame in the current scene.

You can use the scene parameter only on the root timeline, not within timelines for movie clips or other objects in the document.

Example

In the following example, when the user clicks a button to which gotoAndPlay() is assigned, the playhead moves to Frame 16 in the current scene and starts to play the SWF file:

on(keyPress "7") {
    gotoAndPlay(16);
}

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00005723.html