All pastes #258357 Raw Edit

Mine

public text v1 · immutable
#258357 ·published 2006-11-26 13:04 UTC
rendered paste body
asdf.begin = 100;
asdf.finish = 400;
asdf.change = asdf.finish - asdf.begin;
asdf.duration = 30;
asdf.time = 0;

asdf.onEnterFrame = function()
	{
		this._x = ease_cubicInOut(this.time++, this.begin, this.change, this.duration);
		if (this.time > this.duration) delete this.onEnterFrame;
	};

function ease_cubicInOut(t:Number, b:Number, c:Number, d:Number):Number
	{
		var ts:Number = (t /= d) * t;
		var tc:Number = ts * t;
		return b + c * (4 * tc + -6 * ts + 3 * t);
	};