# Catching mouseEvents from siblinged Sprites

**URL:** https://forum.kirupa.com/t/catching-mouseevents-from-siblinged-sprites/245543
**Category:** Uncategorized
**Created:** [November 30, 2007, 7:05pm UTC](https://forum.kirupa.com/t/catching-mouseevents-from-siblinged-sprites/245543 "2007-11-30T19:05:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kkos](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kkos](https://forum.kirupa.com/u/kkos)
#### Post date: [November 30, 2007, 7:05pm UTC](https://forum.kirupa.com/t/catching-mouseevents-from-siblinged-sprites/245543/1 "2007-11-30T19:05:15Z")

</div>

i have the following scenario:

two Sprites A and B, whereas A contains a .png file with some transparent regions,for instance a black rectangle with a hole in the middle. B is a smaller Sprite with  
some Graphics. B has a DisplayList index lower than A so that A covers B and B can only be seen when it is behind the hole in A.

I turn B into a button by adding an EventListener to it.

1. When B is set as a Child of A, B can catch my MouseEvents.
2. But when A and B are just siblings, B doesn’t receive any MouseEvent.

So, is there a way to make B “clickable” in case 2)

Keith

---

<div class="post-metadata">

### Author: ![DavidOrtiz](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@DavidOrtiz](https://forum.kirupa.com/u/DavidOrtiz)
#### Post date: [May 23, 2008, 5:07am UTC](https://forum.kirupa.com/t/catching-mouseevents-from-siblinged-sprites/245543/2 "2008-05-23T05:07:56Z")

</div>

hmmm, im running into how to make two different events fire on sibling movieclips if they are on top of each other? any luck with this?

---

<div class="post-metadata">

### Author: ![yaim0310](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@yaim0310](https://forum.kirupa.com/u/yaim0310)
#### Post date: [May 25, 2008, 3:05am UTC](https://forum.kirupa.com/t/catching-mouseevents-from-siblinged-sprites/245543/3 "2008-05-25T03:05:31Z")

</div>

“getObjectsUnderPoint(point:Point):Array - Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance.” - AS3 Help

That could be used at the point of the mouse click, so just check if the object is in the returned array and call functions accordingly.
