# onLoadComplete with 4 mc's

**URL:** <https://forum.kirupa.com/t/onloadcomplete-with-4-mcs/319486>\
**Category:** flash\
**Created:** [February 22, 2011, 9:30am UTC](https://forum.kirupa.com/t/onloadcomplete-with-4-mcs/319486 "2011-02-22T09:30:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henky](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@Henky](https://forum.kirupa.com/u/Henky)\
**Post date:** [February 22, 2011, 9:30am UTC](https://forum.kirupa.com/t/onloadcomplete-with-4-mcs/319486/1 "2011-02-22T09:30:17Z")

</div>

Unfortunately this doesn’t work.  
I want to load a picture into a mc: list\_0.listA.container.  
When this is done, the mc list\_0 must play.  
When the first picture is loaded into list\_0.listA.container, the second picture must be loaded into list\_01.listA.container, when done: play.  
The problem is in the loadListener.onLoadCompete function, because I can’t target the loaded movieclip as target\_mc. So I tried this, but that doesn’t work. I don’t see the resolution:

```auto
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadComplete = function(target_mc:MovieClip){
    for (var i:Number = 0;i<4;i++){
        if(target_mc == ["_level0.list_"]+i.listA.container){
             _root["list_" +i].play();
        }
    }
    //list_0.play();
    //list_1.play();
    //list_2.play();
    //list_3.play();

}

mcLoader.addListener(loadListener);
for (var i:Number = 0;i<4;i++){
    mcLoader.loadClip("movies/pic_" + lSort* + ".jpg", _root["list_" + i].listA.container);
}

```
