I meant to say that: it is damned obvious that you should use something like the code beneath if all I am interested in is the top most child:

import flash.events.MouseEvent;
function eMH(e:MouseEvent){
    trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

But I am also interested in which children are underneath... how do you go about doing that in AS3? if I don't get a response I will repost as a different topic.

On 3/10/2010 11:39 AM, Anthony Pace wrote:
it is damned obvious that I have to use something like to find out which one is at the top... but how am I to tell which ones are underneath? I remember there was a way, but I can't remember what that way was.

import flash.events.MouseEvent;
function eMH(e:MouseEvent){
    trace(e.target.name);
};
mainContainer_mc.addEventListener(MouseEvent.MOUSE_OVER,eMH);

On 3/10/2010 10:38 AM, Anthony Pace wrote:
if I have a thousand objects in in a container,
and each object is on the layer stack of the display list,
what is the best way to find out which child object is being rendered as the top most layer at a given x,y position?

I don't want to have a thousand contained objects with a thousand active listeners, I only want to have 1 listener in the container monitoring for mouse movement, click, releases, etc... and knowing which child object the mouse is hovering over/clicking etc...

What is the fastest way to do this?
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to