# Movie Clip xPos set to 0?

**URL:** <https://forum.kirupa.com/t/movie-clip-xpos-set-to-0/331093>\
**Category:** Uncategorized\
**Created:** [May 15, 2013, 4:21pm UTC](https://forum.kirupa.com/t/movie-clip-xpos-set-to-0/331093 "2013-05-15T16:21:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![na\_il](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@na\_il](https://forum.kirupa.com/u/na_il)\
**Post date:** [May 15, 2013, 4:21pm UTC](https://forum.kirupa.com/t/movie-clip-xpos-set-to-0/331093/1 "2013-05-15T16:21:50Z")

</div>

Whenever I play the swf, the movie clip’s “x” position is set to zero for like 1 second then it goes to the right place…when I set it to be centered to the stage width and height on entering frame…Why is this?

```auto

var newNumber:Timer = new Timer(1500);
newNumber.start();
newNumber.addEventListener(TimerEvent.TIMER, nextNumber);

function nextNumber(e:TimerEvent):void{
    var newNum:Number = Math.random()*4 - 2;
    k = newNum;
}

stage.addEventListener(Event.RESIZE && Event.ENTER_FRAME, position)

function position(e:Event):void{

TweenMax.to(welcomeBtn, 1.5, {x:stage.stageWidth/2 + (k+.1), ease: Elastic.easeOut})
    
    trace(welcomeBtn.x, k);
    
}

```
