Reputation: 97
How do I identify all the display objects in the display list in ActionScript, below the one that I have clicked? All the other objects are shadowed by the first one. What if other objects have visible parameter as hidden?
Chris
Upvotes: 0
Views: 312
Reputation: 447
There are a few ways you can do this:
If you want to know all the objects under a point you could do this: Actionscript 3: get display object at pixel
var myObjects: Array = stage.getObjectsUnderPoint(new Point(5, 5));
replace 'stage' with any display object as well.
You can also cycle though every diplayobject and do a hit test with another display object (with a index lower than it)
Upvotes: 2