hi,
(nevermind I got it)
I created a simple program where a a mc follows the mouse within a limited area--However, I would like when the mouse is not moving for the mc to go back to center, in this case x=121.4 and y=48.3--Is there such a call? Do I need an event listener? Here is the code:
Thanks,Code:onClipEvent (load) { _x = 121.5; _y = 48.3; speed = 80; } onClipEvent (enterFrame) { this.onMouseMove = function() { endX = this._xmouse; endY = this._ymouse; if (this._x<110.6) { this._x = 110.6; } if (this._x>136.6) { this._x = 136.6; } _x += (endX-_x)/speed; if (this._y>50.3) { this._y = 50.3; } if (this._y<44.3) { this._y = 44.3; } _y += (endY-_y)/speed; } endX = 121.5; endY = 48.3; speed = 20; _x += (endX-_x)/speed; _y += (endY-_y)/speed; }
Yvette


Reply With Quote