0

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

Erik
  • 935
  • 11
  • 28
chrisiek
  • 97
  • 9

1 Answers1

2

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)

Community
  • 1
  • 1
gltovar
  • 463
  • 4
  • 10