hitTest on a Multi-Level Popup Menu

So in this post I asked for some help with hitTest on a popup menu and got a perfectly working answer from TheCanadian.

I was just looking for a way to have a flyup on my menu buttons that opened on mouseOver and closed when the mouse left.

TheCanadain gave me this code and it works nicely:

onClipEvent (load) {
 newy = _y - 45;
 oldy = _y;
 vel = 15;
}
onClipEvent (enterFrame) {
 if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
  _y += (newy - _y) / vel;
 } else {
  _y += (oldy - _y) / vel;
 }
}

Now! I’ve got an extra spin on the menu as I need to have sub menus.

Here’s an example of the menu I’m building:

I’ve tried a few things but am hitting a brick wall so I thought I would ask. :slight_smile:

Any help will be greatly appreciated.