This content has been marked as final. Show 3 replies
if you have mouse handlers for a parent movieclip, no child movieclip will respond to mouse events because the parent intercepts them.
to remedy, define mouse handlers for the youngest generation that needs handlers or use a hitTest() for one of the generations.
Yeah, that was the problem. I found out that another movieclip I was using with onRollOut interfered with this (when I removed the onRollOut, it worked).
The two movieclips are on top of each other...
Any ideas on how to make the onRollOut work with the onRollOver (for two different movieclips?)
you have two options: define mouse handlers for the youngest generation that needs handlers or use a hitTest() for one of the generations.
you can always do both. which works best for you depends upon your set-up.
generally avoiding the hitTest() is preferred because you need to use a loop to continually check the hitTest() results.
but defining mouse handlers for the youngest generation can be challenging unless you're an experienced actionscripter.
a quick way to do this is to place a movieclip or movieclips (with alpha zero) on the parent stage whereever you want "hotspots" to respond to the mouse, in addition, to the child movieclips that are already there.
on the timeline that contains the parent movieclip, you can then use: