This content has been marked as final. Show 3 replies
well, i think i got whats happening.
use a flag to hold whether the mouse is over B or not
on b_rollover, mouse_on_b = true;
on b_rolloout, mouse_on_b = false;
on a_roll_out, if(!mouse_over_b) b.visible=false;
hope it works.
"tgoodmannz_bss" <firstname.lastname@example.org> wrote in message
> I have the following setup:
> Container A
> - On Rollover display (smaller) Container B overlaid on Container
> - On Rollout hide Container B
> Problem is, if I rollover Container A, then rollover Container B, it
> that I have rolled out of Container A. This creates a "flashing" effect
> Container B...
> Is there a simple way to stop this? I only want the mouse events from
> Container A to effect Container B's visibility...
Try setting mouseEvents to false on B
As you've discovered, you have created a feedback loop in container A by using both the rollOver and rollOut events. This is all Flex can do, and is perfectly logical.
One quick solution is to only use the rollOver event on container A, like this:
panelB.visible = !panelB.visible;
This works if B is completely surrounded by A , but the user will still have to move completely off A and then back onto it to show B again. Best you can do, I think.
BUT if B extends beyond A's boundaries, than A will not get a rollOut event when you rollOut of B in a certain direction. So the user may get confused.
There are other gotchas; you need to just try this in your particular case and then deal with the law of unforseen consequences.