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); };