# Simple easing code is not doing gud

**URL:** <https://forum.kirupa.com/t/simple-easing-code-is-not-doing-gud/148742>\
**Category:** Uncategorized\
**Created:** [May 23, 2005, 7:53am UTC](https://forum.kirupa.com/t/simple-easing-code-is-not-doing-gud/148742 "2005-05-23T07:53:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyutipay](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@kyutipay](https://forum.kirupa.com/u/kyutipay)\
**Post date:** [May 23, 2005, 7:53am UTC](https://forum.kirupa.com/t/simple-easing-code-is-not-doing-gud/148742/1 "2005-05-23T07:53:40Z")

</div>

hey guys.

I have a problem here and i need your best assistance please. thanks

here’s what i did:

in frame 1 of the main timeline i created the preloader script which i found in one of the thread here. the preloader’s code is:

//preloaders  
swfBytes = Math.round(\_root.getBytesTotal());  
swfBytesLoaded = Math.round(\_root.getBytesLoaded());  
bytesTotal = (swfBytesLoaded/swfBytes);  
loadBar\_mc.\_width = bytesTotal \* 100;  
if(swfBytesLoaded == swfBytes)  
{ //go to and play the frame  
this.gotoAndPlay(3);  
}

in frame 2 of the main timeline, i added this code:

this.gotoAndPlay(1);

in the frame 3, which will be the start of the scene when the movie is fully loaded, i added a movieclip with its actions below (a simple easing)

onClipEvent(load){  
this.\_x = 0;  
newCoord = 300;  
speed = 10;  
}

onClipEvent(enterFrame){  
this.\_x += (newCoord - \_x)/speed;  
}

now, the problem is that the movieclip with action above won’t move to the new location i specified within the onClipEvent(enterFrame). what seems to be wrong with this?
