PDA

View Full Version : Problem Stopping multiple movie clips


msabo
07-04-2003, 02:55 PM
I have a movie in which I load multiple movieclips. The movie clips play in a continuous loop.

I am trying to stop the movie clips and am having a problem. Since I do not know how many clips I have running I need to stop them in a loop similar to this:

for(x=0; x<=../:TotalClips; x++) {
eval("clip"+x).stop();
}

The problem is that only the first movie gets stopped. In debug mode after executing the eval statement once, the code takes off again even though I was stepping though it.

If I were to write the code as
eval("clip" + 0).stop();
eval("clip" + 1).stop();

it will work.

Any ideas? I have only been using flash for a couple of days now (MX version) so I might be missing something obvious.

Thank you in advance

magicwand
07-04-2003, 03:06 PM
for(x=0; x<=_root.TotalClips; x++) {
_root["clip"+x].stop();
}
i think this is what you are after

msabo
07-04-2003, 03:22 PM
That is exactly what I was after!!