Syntax
spritename.gotoAndPlay(frame / label)
Arguments
spritename: The name of the Sprite / Movie Clip to be played.
frame: The Frame number or label to which the playhead is sent.
Returns
Nothing.
Description
Action and Sprite Method: Sends the playhead to the specified Frame in a Scene and plays from that Frame.
Sample
onLoad() {
this.gotoAndPlay(16); // Sprite starts at Frame 16 when loaded.
}
See Also
play(), stop(), gotoAndPlay(), gotoAndStop(), gotoSceneAndPlay(), gotoSceneAndStop(), nextFrameAndPlay(), nextFrameAndStop(), prevFrameAndPlay(), prevFrameAndStop(), skipFrameAndPlay() and skipFrameAndStop().