Onrollout follow the mouse, else stop following! :D

hi there,
i’m busy with something in flash… but i want to do the following thing.
i got a MC … this must follow the mouse so onrollout follow the mouse
and onrollover stop following the mouse. i tried this code:

 onClipEvent (enterFrame) { 
this.onRollOut = function () {
mx=_root._xmouse;
if (mx<_x) {
dx=_x-mx;
}
else {
dx=mx-_x;
}
moveSpeedx=dx/10;
if (mx<_x) {
_x=_x-moveSpeedx;
}
else {
_x=_x+moveSpeedx;
}
my=_root._ymouse;
if (my<_y) {
dy=_y-my;
}
else {
dy=my-_y;
}
moveSpeedy=dy/10;
if (my<_y) {
_y=_y-moveSpeedy;
}
else {
_y=_y+moveSpeedy;
}
}
} 

:smiley: i hope someone can help me…
well cya later