Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
What's with the "one"? Are you using timeline markers? If you want to go to frame one, then you should call gotoAndPlay(1). – bummzack Nov 23 '11 at 8:14
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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