it moves away from the mouse because you tell it to.
this._x += (goalx - this._x)/speed;
moves the object along the x axis. the only thing onEnterFrame does is take the limits you set above and apply them to the object. if you want to stop it from moving along the x axis, just comment out that line.
|