PDA

View Full Version : Voetsjoeba Ease In?



novetree
March 22nd, 2005, 11:14 AM
I'm using Flash MX

Was wondering if anyone had any ideas on making Voetsjoeba's golden formula ease "In" (slow to fast)


Here is the code for ease "out" (fast to slow):


MovieClip.prototype.ease = function(x,y){
this.onEnterFrame = function(){
this._x = x-(x-this._x)/1.1;
this._y = y-(y-this._y)/1.1
if(this._x > x-1 && this._x < x+1 && this._y > y-1 && this._y < y+1){
this._x = x;
this._y = y;
delete this.onEnterFrame
//do other stuff here, this is the point at which the object reaches its target
}
}
}



Mad props to Voetsjoeba by the way.