# Event listener

**URL:** <https://forum.kirupa.com/t/event-listener/320193>\
**Category:** Uncategorized\
**Created:** [March 16, 2011, 9:48am UTC](https://forum.kirupa.com/t/event-listener/320193 "2011-03-16T09:48:53Z")\
**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 16, 2011, 9:48am UTC](https://forum.kirupa.com/t/event-listener/320193/1 "2011-03-16T09:48:53Z")

</div>

Hi,

I am loading 5 images using “for loop” and I have created the listener and if the images completes the loading, the function is called. Now, I need is the name of the “image” which is loaded on each five images gets completed.

```auto
    for (var a:Number=0; a<5; 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.load(new URLRequest(myarray[a]));
        tmc.addChild(loader);
    }

```

in the output it is throwing as “[object LoaderInfo]”.

Now i need is the name of the “Image”, inside the thumbnail\_load function, that means, which image loading is completed.

can anyone help me

Thanks in advance.
