2 Replies Latest reply on Nov 3, 2007 2:30 PM by spireality

    Drop Down Menu Glitch

    spireality
      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
        • 1. Re: Drop Down Menu Glitch
          clbeech Level 3
          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.
          • 2. Re: Drop Down Menu Glitch
            spireality Level 1
            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.