# Easing but not perfect

**URL:** <https://forum.kirupa.com/t/easing-but-not-perfect/197426>\
**Category:** Uncategorized\
**Created:** [August 16, 2006, 7:34am UTC](https://forum.kirupa.com/t/easing-but-not-perfect/197426 "2006-08-16T07:34:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mngBJ](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mngBJ](https://forum.kirupa.com/u/mngBJ)\
**Post date:** [August 16, 2006, 7:34am UTC](https://forum.kirupa.com/t/easing-but-not-perfect/197426/1 "2006-08-16T07:34:52Z")

</div>

i add ease for my MC but it doesn’t work elasicly. so what is the problem?  
here is my code.

```auto

cir.onEnterFrame = function(){
	this._x = this._x + (_root._xmouse - this._x) * .2;	
	this._y = this._y + (_root._ymouse - this._y) * .2;	
}

```

and here is the i copied from onesome’s AS.

```auto

cir.onEnterFrame=function(){
	if (_root._xmouse == this._x){
		this._x += _root._xmouse;
		this._y += _root._ymouse;
		isFollowing = true;
	}else if (isFollowing){
		speedx = (_root._xmouse - last_xmouse) * .8;
		speedy = (_root._ymouse - last_ymouse) * .8;
		this._x = _root._xmouse + speedx;
		this._y = _root._ymouse + speedy;
		isFollowing = false;
	}else{
		speedx += (_root._xmouse - this._x) * .8;
		speedy += (_root._ymouse - this._y) * .8;
		speedx *= .7;
		speedy *= .7;
		this._x += speedx;
		this._y += speedy;
	}
	last_xmouse = _root._xmouse;
	last_ymouse = _root._ymouse;

}

```

but i think this one is so old. and i tried alot.  
but i cann’t get. any suggestions?
