Gotoandstop Function - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

gotoAndStop function

gotoAndStop([scene:String], frame:Object) : Void
Sends the playhead to the specified frame in a scene and stops it. If no scene is specified, the
playhead is sent to the frame in the current scene.You can use the
the root Timeline, not within Timelines for movie clips or other objects in the document.
Availability: ActionScript 1.0; Flash Player 2
Parameters
[optional] - A string specifying the name of the scene to which the playhead is
scene:String
sent.
- A number representing the frame number, or a string representing the label
frame:Object
of the frame, to which the playhead is sent.
Example
In the following example, a document has two scenes:
contains a frame label on Frame 10 called
. This ActionScript is placed on Frame 1, Scene 1 of the main Timeline:
myOtherBtn_btn
stop();
myBtn_btn.onRelease = function(){
gotoAndStop("newFrame");
};
myOtherBtn_btn.onRelease = function(){
gotoAndStop("sceneTwo", 1);
};
When the user clicks the buttons, the playhead moves to the specified location and stops.
See also
gotoAndStop (MovieClip.gotoAndStop method)
gotoAndPlay function
sceneOne
, and two buttons,
newFrame
,
stop function
parameter only on
scene
and
. Scene one
sceneTwo
and
myBtn_btn
,
play function
Global Functions
,
63

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF