
Код:
speed = 10;
_m = _root.createEmptyMovieClip ("pnt", 2);
_m._x = 200;
_m._y = 200;
_m.attachMovie ("pnt", "pnt", 200);
someListener = new Object ();
someListener.onMouseDown = function () {
_m.dx = (_xmouse - _m._x) / speed;
_m.dy = (_ymouse - _m._y) / speed;
_m.cx = 0;
_m.onEnterFrame = _m.enterFrame;
};
Mouse.addListener (someListener);
_m.enterFrame = function () {
this.cx++;
if (this.cx == speed) {
delete this.onEnterFrame;
}
this._x += this.dx;
this._y += this.dy;
};