Flash CS5 AS3 Is there a way to reset all the timelines while/if the Frame 1 en Scene 1 is called?

I happen to have lots symbols with timelines, if I gotoAndPlay Scene 1 frame 1, most symbols won't restart.

I use

  • \$\begingroup\$ What's with the "one"? Are you using timeline markers? If you want to go to frame one, then you should call gotoAndPlay(1). \$\endgroup\$ – bummzack Nov 23 '11 at 8:14

If you have only one level of children, it's easy. You just loop through them and call gotoAndPlay like this:

for (var i:int = 0; i< MovieClip(root).numChildren; i++) 

But if you have multiple levels of children, you should do a recursion through all children and run the code above for all of them.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.