# A Tweener working wrong

**URL:** https://forum.kirupa.com/t/a-tweener-working-wrong/328328
**Category:** flash
**Created:** [May 8, 2012, 6:33pm UTC](https://forum.kirupa.com/t/a-tweener-working-wrong/328328 "2012-05-08T18:33:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MFRS](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MFRS](https://forum.kirupa.com/u/MFRS)
#### Post date: [May 8, 2012, 6:33pm UTC](https://forum.kirupa.com/t/a-tweener-working-wrong/328328/1 "2012-05-08T18:33:37Z")

</div>

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?

```auto
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);
}

```
