Gotoandstop Function - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

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(){
gotoAndPlay("newFrame");
};
myOtherBtn_btn.onRelease = function(){
gotoAndPlay("sceneTwo", 1);
};
When the user clicks the buttons, the playhead moves to the specified location and continues
playing.
See also
gotoAndPlay (MovieClip.gotoAndPlay method)
,
function
prevFrame function

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 Lite 1.0
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.
52
ActionScript language elements
sceneOne
and two buttons,
newFrame
,
nextFrame function
and
. Scene one
sceneTwo
and
myBtn_btn
,
play
parameter only on
scene

Advertisement

Table of Contents
loading

Table of Contents