http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html#getObjectsUnderPoint%28%29
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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders