Skip to main content
September 5, 2013
Question

Double Rollover/Rollout Conundrum

  • September 5, 2013
  • 1 reply
  • 1634 views

Hi Everybody,

I have an issue where I have a layer with a movieclip in it that globally covers the whole stage. Everytime the user rolls over it, it triggers a MC reveal. Everytime the user rolls out, it goes back into hiding. It is meant to only rollover/rollout when the user's mouse comes onto or leaves the stage area.

The problem I have is I have other movieclips on layers above it that have rollover/release functions as well. So everytime I rollover one of them it accidentally trigers the global stage rollover/out beneath it.

Is there a way I can have a rollover for a hit area covering the complete stage underneath other functinoing MC buttons without it triggering an early rollout?

Does that makee sense? Is there a solution?

Thanks for any feedback.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 5, 2013

you can use the stopPropagation() method of your mouse event to stop the event from being propagated to other listeners.

September 5, 2013

I'm not really trying to stop the ones on top, more I'm trying to keep the buttons/movie clips on top of the main button from affecting the rollout command of the one below them.

I want the only rollout for the bottom MC to be the border of the stage not from anything above it that could get in the way?

Know what I mean?

kglad
Community Expert
Community Expert
September 6, 2013

any object1 at a depth greater than object2 should intercept mouse events so they're not detected by object2.

is that the problem?  a rollover of object1 is triggering a rollout of object2?