Hi!
I have a menu inside a movieclip. It’s suppose to follow the mouse with ease (as in kirupas tutorial), and when it hits the center - stop following it until the mouse rolls out.
I have been trying all kinds of stuff to get my menu to behave properly,
but I can’t really figure it out. Can anybody point me in the right direction, or maybe help me out?
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 4;
}
onClipEvent (enterFrame) {
if ((_root._xmouse>(this._x-40)) and (_root._xmouse<(this._x+40)) and (_root._ymouse>(this._y-9)) and (_root._ymouse<(this._y+9))) {
//
} else {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
}
:afro: