Link to home
Start Free TrialLog in
Avatar of socross
socrossFlag for United Kingdom of Great Britain and Northern Ireland

asked on

AS3 Mouse Event MOUSE_OUT

Hi Guys,

I am having some issues with getting the MOUSE_OUT event to behave.

I have a button movie clip which on MOUSE_OVER expands a box below it with a news item mc in. I want to set it up sp that the close function is triggerd when the mouse leaves the expanded box. This works fine with the exception that if the mouse rolls over the news item within the expanded box it thinks it has left and calls the close function.

Can anyone offer any ideas that would solve this.

Many thanks

S
Avatar of AreDubya
AreDubya
Flag of United States of America image

socoss,

Off the top of my head, if the news item is a child of the thing you want to expand you should be ok.... but, since it seems you aren't ok, could you post an fla to look at?

AreDubya
Avatar of socross

ASKER

Hi there,

Thanks for your reply!

I seem to be running into the same issue, regardless of whether the news item is a child of element I am expanding!

I will double check my code and make sure I am adding the news item as a child!

If this doesn't resolve the issue I will post my fla tomorrow!

Many thanks

s
No worries. I had a similar problem recently, and the fix was obscure enough that I don't want to throw out a bunch of ideas without knowing what I am talking about. ;)

Let me know how it works.

AreDubya
Avatar of socross

ASKER

Hi aredubya

sorry I have not got back to you sooner, I have not had a chance to look at it yet!

I have been thinking it over, Im assuming that the news mc is not a child of the expanded area because I do not want it to expand/ strech the news items as well!

Would I need to add it ad a child after the expand tween and remove it when I close the news item?

I will post the example fla later today or tomorrow.

Thanks s
ASKER CERTIFIED SOLUTION
Avatar of AreDubya
AreDubya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of socross

ASKER

Hi AreDubya

Thanks for your input on this, the solution was as you suggested, by using the outer container with the bg and news as children of this element.

The only addition was to use the ROLL_OVER event instead of the MOUSE_OVER event as it does not automatically set the .mouseChildren = true.

See: http://flashdevz.wordpress.com/2008/08/23/as3-mousechildren/

Many thanks for all your input.

S