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
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