I have a movieclip called "main", inside of that I have all my layers and tweens, within another movieClip in those layers I have yet another movieClip which I wish to stop playing when the second movie clip has played 3 times.
movieClips:
main > trampoline > boyBounce
I have to code to stop the second "main" MC, but not the "boyBounce" one.
When the "main" MC have played 3 times It calls commands to gotoAndStop, I need a command I can call to stop/or goto the first frame of "boyBounce".
Ive tried:
_root.boyBounce.gotoAndStop("bounce_stop");
boyBounce.stop();
_level0.boyBounce.gotoAndStop("bounce_stop");
"bounce_stop" is the name of the first frame in "boyBounce".
Cheers
EDIT: I'll settle for a command that will stop ALL movieClips playing.
Best Answer
If you want to stop the
boyBounce
movie at the first frame. this code helps youOr, if you want to stop the
trampoline
movie at any of the desired frame then this one helps youOr, if you want to simply stop the animation of
trampoline
thenor
boyBounce
BTW, you can trace the thing which doesn't works in the correct direction. For example, in your code if you are trying to
trace
_root.boyBounce
orboyBounce
or_level0.boyBounce
it logsnull
. Because there is no movie with the nameboyBounce
in the stage. Take care on object scope.FYI, If you want to access any movieclip from the stage you should access via it's parent, you can't access the child directly unless you are accessing from the same level.
Always remember to access like
PARENT_NAME.PARENT_NAME.CHILD_NAME
. Also don't forget if you don't add_root
in the front then it's start from the level you have ur code and it searches the movie with namePARENT_NAME
in that level and returns null if there is no movie in that name.