i add ease for my MC but it doesn’t work elasicly. so what is the problem?
here is my code.
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.
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?