I've been trying to figure some things out and from my research i think its a custom event i need to make.

I currently have this.

PHP Code:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadTheImage);

function 
loadTheImage(evt:Event):void {

    
MainImage.addChild(loader);

I want to use this one function for all my image loads howevr i'd need to change MainImage and loader for when im loading images into different places.

Can anyone help me sort this?

Thanks