Counter help?

Hey all,

I’m using a very simple counter code:

counter2++;
if (counter2<10) {
gotoAndPlay(131);
}

This counter is in a scene that loops forever. However, the counter only counts through on the first time through the scene. How do I reset the counter each time, so it counts each time the scene is looped?

Thanks!

I’m not sure I understand what you are saying, but my guess to what you are saying is right before you go back into that loop, somewhere, on someframe you have to tell flash that it’s a zero again:


counter2=0;

That’s it exactly.

Thanks for the tip.