Wait loading inside the attached movie

Hi everyone!

Im attaching lots of movies in to empty clip in a for loop.like this


...
for (i=total-1; i >= 0; i--) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
   creatPage(i);
   }
 AFUNCTION_AFTER_FOR();
...
function creatPage(j){
 
 mclips[j] = _root.ana.attachMovie("gana", "gana"+j , ana.getNextHighestDepth());
 mclips[j].mc.loadMovie(image[j]);
}

As you can see i also load something into the clip that i attached. So i creat lots of attached movies and load images into MCs inside the attached movies.

:wt: The problem is that , i want the AFUNCTION_AFTER_FOR() wait, untill all mcs in all attached movies loaded.

I thinking of using counters for loaded movies…and somemore things but… i cant come up with an exact solution, and i also searched the web, im sure there must be at least one more person in the galaxy who comes up with this problem but i couldnt find him on web:puzzled:.

So anyone has idea?

Thnx alot.