![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
To jump to a specific frame or scene in the SWF file, you can use the gotoAndPlay()
and gotoAndStop()
global functions or the equivalent gotoAndPlay()
and gotoAndStop()
methods of the MovieClip class. Each function or method lets you specify a frame to jump to in the current scene. If your document contains multiple scenes, you can specify a scene and frame to jump to.
The following example uses the global gotoAndPlay()
function within a button object's onRelease
event handler to send the playhead of the Timeline that contains the button to Frame 10.
jump_btn.onRelease = function () { gotoAndPlay(10); }
In the next example, the MovieClip.gotoAndStop()
method sends the Timeline of a movie clip named categories_mc
to Frame 10 and stops. When you use the MovieClip methods gotoAndPlay()
and gotoAndStop(),
you must specify an instance to which the method.
jump_btn.onPress = function () { categories_mc.gotoAndStop(10); }
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |