Table of Contents

MovieClip.gotoAndStop( ) Method Flash 5

jump to a given frame, and stop the playhead
mc.gotoAndStop(frameNumber)
mc.gotoAndStop(frameLabel)

Arguments

frameNumber

A positive integer indicating the number of the frame to which the playhead of mc should jump. If frameNumber is less than 1, the call to MovieClip.gotoAndStop( ) is ignored. Note that this behavior differs from the global version of gotoAndStop( ), where a value less than 1 is treated as 1. If frameNumber is greater than the number of frames in mc's timeline, the playhead is sent to the last frame.

frameLabel

A string indicating the label of the frame to which the playhead of mc should jump. If frameLabel is not found, the operation fails silently. This behavior differs from the global version of gotoAndStop( ), where a missing frame label is treated as frame 1.

Description

The MovieClip.gotoAndStop( ) method is an alternative to the global gotoAndStop( ) function. Use the MovieClip method form to control remote movie clips or main movies specified by mc.

For general usage instructions, see the global gotoAndStop( ) function.

Example

// Send the mainMenu_mc clip to frame 6, and stop the playhead there
mainMenu_mc.gotoAndStop(6);

See Also

gotoAndStop( ), MovieClip.gotoAndPlay( )


Table of Contents