# Event listener

**URL:** <https://forum.kirupa.com/t/event-listener/320222>\
**Category:** Uncategorized\
**Created:** [March 17, 2011, 3:41am UTC](https://forum.kirupa.com/t/event-listener/320222 "2011-03-17T03:41:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![microScript](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@microScript](https://forum.kirupa.com/u/microScript)\
**Post date:** [March 17, 2011, 3:41am UTC](https://forum.kirupa.com/t/event-listener/320222/1 "2011-03-17T03:41:47Z")

</div>

Hi,

I have imported 5 images to my mc using “for loop” and have add an event listener for loading complete. I can able to know, in which movie clip it is complete. the code is below:

```auto
    for (var a:Number=0; a<arr.length; a++) {
        var tmc:MovieClip=new MovieClip();
        thumbMc.addChild(tmc);
        tmc.name="thumbmc"+a;
        var loader:Loader = new Loader();
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbnail_load);
        function thumbnail_load(e:Event):void {
                    trace(e.target.loader.parent.name)
        }
        loader.load(new URLRequest(arr[a][1]));
        tmc.addChild(loader);
}

```

Now I need to know is, the name of the image which is loaded for each and every loading.

can any one help me out of this?
