|
-
My children are stealing the listener
Hey dudes
I've got a big fat parent full off children, with lots of gaps between the children.
I apply an event listener to the parent which adds a tween. Once the parent starts moving I add a listener to stop the tween if the mouse moves off THE PARENT.
But my children steal the listener! So the animation stops if the mouse moves off one of the children. Even If a put one of the children as a large background BEHIND everything.
Now,
Code:
parentContainer.mouseChildren = false;
would normally also fix my problem, and does in this instance, to a point. But I still want the children to be able to interact with the mouse while the parent is animating.
How can I stop the children from stealing one particular event listener?
Last edited by eggler; 04-02-2008 at 01:10 AM.
-
They're not stealing the listener. The MOUSE_OUT event triggered by moving the mouse off the children is simply bubbling up to the parent.
What you should probably do is doublecheck that event.target == event.currentTarget in your event handler. That will ensure that the instance that dispatched the event is the same one as the one processing the listener.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|