Ive got a question that feels like it should be easy but I cant figure it out.
Suppose I have 2d grid of square sprites on the stage, lets say 20 by 20 (400 sprites).
Another sprite moves accross the stage on top of the grid.
The moving sprite and the 400 sprites below it share a common parent.
So heres the question: How do I find out which of the 400 sprites the moving sprite is currently over? And heres an extra wrinkle: I lied, the sprites are not square they are of differing shapes so I cant do a simple math calculation.
All I can come up with is something like hitTestPoint(), but then I would have to call it 400 times wouldnt I? That is probably the most inefficient way to do things.
Is there a function like whatsUnderThisPoint(p : Point) which will return a list of every sprite on the display list that contains p?
Or am I approaching this the wrong way?
Thanks in advance!