# Help on adjusting the speed of easing on mousemove!?

**URL:** <https://forum.kirupa.com/t/help-on-adjusting-the-speed-of-easing-on-mousemove/213006>\
**Category:** flash\
**Created:** [January 16, 2007, 9:54am UTC](https://forum.kirupa.com/t/help-on-adjusting-the-speed-of-easing-on-mousemove/213006 "2007-01-16T09:54:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manga](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@manga](https://forum.kirupa.com/u/manga)\
**Post date:** [January 16, 2007, 9:54am UTC](https://forum.kirupa.com/t/help-on-adjusting-the-speed-of-easing-on-mousemove/213006/1 "2007-01-16T09:54:12Z")

</div>

hey all,

i have the simple easing code:

bg\_mc.onEnterFrame=function(){  
speed = 30;

this.\_x+=(\_root.\_xmouse-this.\_x)/speed;  
this.\_y+=(\_root.\_ymouse-this.\_y)/speed;  
}

// ok this work fine on a small movieclip  
but when my movieclip is 5500 x 5500 px big;  
the small movements are to fast…  
so what is a smart Math way to calculate if the mouse is moved slowly the speed is also slowly if the user moves fast the speed is very fast
