# Complete event

**URL:** https://forum.kirupa.com/t/complete-event/278692
**Category:** flash
**Created:** [January 3, 2009, 11:06pm UTC](https://forum.kirupa.com/t/complete-event/278692 "2009-01-03T23:06:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![magnusvs](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@magnusvs](https://forum.kirupa.com/u/magnusvs)
#### Post date: [January 3, 2009, 11:06pm UTC](https://forum.kirupa.com/t/complete-event/278692/1 "2009-01-03T23:06:11Z")

</div>

Hi.

I am struggling a little with calling a function on the COMPLETE event. Here is the code:

```auto
var myLoader:Loader=new Loader()

var strURL:String=<image url>
myLoader.load(new URLRequest(strURL));
myLoader.addEventListener(Event.COMPLETE, myFunction);

this.addChild(myLoader)
myLoader.x=0
myLoader.y=0

function myFunction(evt:Event){
    trace("Load");
}

```

The image appears on the stage when loaded, but the function myFunction is not called. If anybody could help me with this, I would be very thankful 🙂
