all groups > flash actionscript > november 2007 >
You're in the

flash actionscript

group:

Drop Down Menu Glitch


Drop Down Menu Glitch spireality
11/3/2007 12:04:35 AM
flash actionscript:
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.http://www.jp-graphics.net/viewer4.html

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
Re: Drop Down Menu Glitch clbeech
11/3/2007 2:51:32 AM
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.
AddThis Social Bookmark Button