Skip to main content
Known Participant
November 3, 2007
Question

Drop Down Menu Glitch

  • November 3, 2007
  • 1 reply
  • 201 views
I'm making a drop down menu from scratch and everything seems to be great except that my sub menu item won't animate. Everything seems properly placed to me, but I may need to change something in the action script.

It's best to see it in action here. here

Let me know if you need further info or if there's a better way to structure the whole thing - or if you know of any free tutorials that'll dial me in.

Thanks,

JP
This topic has been closed for replies.

1 reply

clbeech
Inspiring
November 3, 2007
yes, you're having a common problem here. One can't place button (MC buttons even) within another the has an on handler, what happens is that the parent buttons events are the only ones that receive event notification. So this approach won't work.

one solution, is to use a hitTest method to fire one of the two controls, usually the first or parent instance that contains the 'sub-buttons' is easiest. Set up an onEnterFrame of setInterval loop that continuously checks to see if the parent MC is coming in contact with the Mouse (use a shapeflag hitTest based on the mouse coordinates). If so open up the MCs drop down, then use normal button handlers for the sub-buttons. then within the loop test, if the mouse does not come in contact with the instace, set it back to it's closed position.
Known Participant
November 3, 2007
hmm...
Thanks for the heads up on that.

But I'm not familiar at all with the hitTest or onEnterFrame scripts. If there's any way you could give me a more specific example, I'd be much obliged.

Thanks for you help thus far.