How to pause a moving object on mouse rollOver

Sup All //

I am trying to achieve a rollover effect like this menu.

http://www.ravijour.com/

The menu is working and sliding perfectly, however it’s still a little squirmish, and if I can’t figure this out I’ll deal with it and let it slide. However it’s bugging me and want to correct the “sluggishness” of this issue. I want the menu to pause, or rest when you open it, so that there isn’t a chance the it can slide off of the users mouse pointer. :smiley:

Here is the code


onClipEvent (load) {
    _y = 0;
    speed = 5;
}
onClipEvent (enterFrame) {
    endY = _root._ymouse;
    _y += (endY-_y)/speed;
}

on(rollOver)
{
    speed = 0;
}
on(rollOut)
{
    speed = 5;
}

I thought a simple on (rollOver) speed = 0 would do the trick, however it just sends the menu in a frenzy. Hehe

Thanks all