I am doing a image gallery in as3 and i want to when i load the full_image through xml it creates a small animation that comes small from the center of the screen to full screen, but it always pop-up in the upper corner of the screen. Is there anything wrong i’m doing in the code?
function fullLoaded(e:Event):void{
var my_loader:Loader = Loader(e.target.loader);
addChild(my_loader);
my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y =(stage.stageHeight - my_loader.height)/2;
my_loader.width = my_loader.width/2;
my_loader.height = my_loader.height/2;
Tweener.addTween(my_loader,{width: my_loader.width*2, height: my_loader.height*2, time:1,transition:"easeOutSine"});
my_loader.addEventListener(MouseEvent.CLICK,removeFull);
}