
MovieClip.gotoAndStop() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
663
MovieClip.gotoAndPlay() Method
jump to a given frame, then play the movie or clip
Flash 5
mc.gotoAndPlay(frameNumber)
mc.gotoAndPlay(frameLabel)
Arguments
frameNumber
A positive integer indicating the number of the frame to which the playhead
of
mc should jump before playing. If frameNumber is less than 1, the call to
MovieClip.gotoAndPlay() is ignored. Note that this behavior differs from the
global version of gotoAndPlay(), where a value less than 1 is treated as 1. If
frameNumber is greater than the number of frames in mc’s timeline, the play-
head is sent to the last frame.
frameLabel A string indicating the label of the frame to which the playhead of
mc should
jump before playing. If
frameLabel is not found, the operation fails silently.
This behavior differs from the global version of gotoAndPlay(), where a
missing frame label is treated as frame 1.
Description
The MovieClip.gotoAndPlay() method is an alternative to the global gotoAndPlay() func-
tion. Use the MovieClip method form to control remote movie clips or movies, specified by
mc.
For general usage instructions, see the global gotoAndPlay() function.
Example
// Send the part1_mc clip to the label intro, then play part1_mc
part1_mc.gotoAndPlay("intro");
See Also
gotoAndPlay( ...