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
LVL 1
socrossAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AreDubyaCommented:
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
0
socrossAuthor Commented:
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
0
AreDubyaCommented:
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
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

socrossAuthor Commented:
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
0
AreDubyaCommented:
socross,

It doesn't necessarily have to be a child of the expanded area. If both were children of a larger container movie clip, and the MOUSE_OUT listener were attached to that you should be good. So, have the rollover of the button expand containerMC.expandBox , and add the MOUSE_OUT listener to containerMC. See how that works for you.

AreDubya
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
socrossAuthor Commented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.