|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem Stopping Movie Clips
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 loaded I need to close 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. Find note, 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 |
|
#2
|
|||
|
|||
|
/:varName is deprecated. Instead use _root.mcA.mcB.varName (ie. the full path from the root)
var x = _root.mcA.mcB.varName; for(var i = 0; i < x; i++){ _root["clip"+i].stop(); }
__________________
~mgb |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Problem Stopping Movie Clips |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|