# Wait loading inside the attached movie

**URL:** <https://forum.kirupa.com/t/wait-loading-inside-the-attached-movie/234415>\
**Category:** Uncategorized\
**Created:** [August 2, 2007, 1:03am UTC](https://forum.kirupa.com/t/wait-loading-inside-the-attached-movie/234415 "2007-08-02T01:03:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![forumg](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/forumg/32/3953_2.png) [@forumg](https://forum.kirupa.com/u/forumg)\
**Post date:** [August 2, 2007, 1:03am UTC](https://forum.kirupa.com/t/wait-loading-inside-the-attached-movie/234415/1 "2007-08-02T01:03:27Z")

</div>

Hi everyone!

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

```auto

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