 <p>The betterway to Achieve this effect is to measure speed/over/distance this formula will be easier and a lot less code.Doing it this way you wouldnt need any tween library's.</p> <pre><code> var MaskCenter=100; var speed=1/10; var distance=boxdummy.mouseX-MaskCenter; if(mouseX&lt;250){ box.x-=(distance*speed); } if (mouseX&gt;250) { box.x -= speed + accel; } </code></pre> <p>Something like that! </p> <p>If you cant work it, let me know i will make up a (fla) file for you</p>