|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
How to control the main timeline from a movieclipI've seen people searching all over the internet for a way to control the main timeline from inside a movieclip. Well, here it is! To enter Pause mode: MovieClip(root).gotoAndStop(MovieClip(root).currentFrame); To enter play mode: MovieClip(root).gotoAndPlay(MovieClip(root).currentFrame); Possible ApplicationIn the code below, IsPlayMode() is your own function that tracks the current Play/Pause mode. This could be a movieclip with 2 frames showing a play and pause graphic.
if (IsPlayMode()) {
MovieClip(root).gotoAndPlay(MovieClip(root).currentFrame);
}
else {
MovieClip(root).gotoAndStop(MovieClip(root).currentFrame);
}
|
|
|
|
|