MovieClip.prototype.acelTo = function(x, y, acel) { if (acel == null) { acel = 3; } this.onEnterFrame = function() { if (x<>null) { this._x += (x-this._x)/acel; if (Math.floor(x-this._x) == 0) { xok = true; } } if (y<>null) { this._y += (y-this._y)/acel; if (Math.floor(y-this._y) == 0) { yok = true; } } if (yok == true and xok == true) { yok = false; xok = false; this.onEnterFrame = null; } }; };