should be easy right? well none of my attempts work, they all appear in the same very edge of screen.

each loader is created with a different sized image so the loader needs to be positioned dynamically to adjust for the varying hight / width of the loader object.

i tried.

Code:
var myLoader:Loader = new Loader();
		addChild(myLoader);
		var url:URLRequest = new URLRequest(description);
		myLoader.load(url);
		myLoader.addEventListener( MouseEvent.CLICK, myLoaderClick );
		function myLoaderClick(event:MouseEvent):void {

		myLoader.unload();
	
		}
		trace(stage.width, stage.stageWidth);
    	trace(stage.height, stage.stageHeight);
		myLoader.x = (stage.stageWidth - myLoader.width) / 2;
		myLoader.y = (stage.stageHeight - myLoader.height) / 2;
		
		
		closebut.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler9);
		function mouseDownHandler9(event:MouseEvent):void {
    
		myLoader.unload();
		}