
gotoAndPlay() Global Function
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
542
|
ActionScript Language Reference
Bugs
In Flash 6, a so called “getter/setter” property cannot be added directly to the _global
object. See Object.addProperty( ) for details.
See Also
Chapter 2; “The Scope Chain,” in Chapter 9
gotoAndPlay() Global Function
move the playhead to a given frame, and play the current clip or movie
Flash 2
gotoAndPlay(frameNumber)
gotoAndPlay(frameLabel)
gotoAndPlay(scene, frameNumber)
gotoAndPlay(scene, frameLabel)
Arguments
frameNumber
A positive integer indicating the number of the frame to which the playhead
of the current timeline should jump before playing. If
frameNumber is less than
1 or greater than the number of frames in the timeline, the playhead is sent to
either the first or last frame, respectively.
frameLabel
A string indicating the label of the frame to which the playhead of the current
timeline should jump before playing. If
frameLabel is not found, the playhead
is sent to the first frame of the current scene.
scene An optional string indicating the name of the scene that contains the speci-
fied
frameNumber or frameLabel. If not supplied, the current scene is assumed.
Description
When invoked without a scene argument, gotoAndPlay( ) sends the playhead of the current
timeline to the frame specified by either
frameNumber