# Problems with getObjectsUnderPoint()

**URL:** <https://forum.kirupa.com/t/problems-with-getobjectsunderpoint/235056>\
**Category:** Uncategorized\
**Created:** [August 8, 2007, 1:46am UTC](https://forum.kirupa.com/t/problems-with-getobjectsunderpoint/235056 "2007-08-08T01:46:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thurinus](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@Thurinus](https://forum.kirupa.com/u/Thurinus)\
**Post date:** [August 8, 2007, 1:46am UTC](https://forum.kirupa.com/t/problems-with-getobjectsunderpoint/235056/1 "2007-08-08T01:46:35Z")

</div>

Hey everyone!

I can’t seem to get any expert advice on the Flashkit forums regarding this issue, so I thought I might try here.

Though I have more problems with getObjectsUnderPoint() than this, I’ll address each problem one step at a time.

Let’s say I have a class called **Game** , which is attached as the movie **document class**. Game has children called **Enemy** and **EnvironWidget**. Both Enemy and EnvironWidgets are movieclips that have squiggly vector graphics in them.

In **Game** , I have:

```auto
addEventListener(MouseEvent.MOUSE_UP,showMeCollisi ons);
private function showMeCollisions(e:MouseEvent):void{
trace(stage.getObjectsUnderPoint(new Point(mouseX,mouseY)));
}

```

When I click \*\*EnvironWidget \*\*and trace the resulting array, I get [object EnvironWidget]. Great! just as I expected. but if I do the same on **Enemy** , I get [object Shape]. What’s happening?

According to the documentation, the method getObjectsUnderPoint() should return \*\*ALL \*\*children that’s under the point specified. So if it were to faithfully follow this spec, I’d expect clicking on EnvironWidget to return [object EnvironWidget],[object Shape], and clicking on Enemy to return [object Enemy],[object Shape]. But obviously it isn’t. What’s happening?

Thanks for any help!  
Jay.
