# Not rectangular mouse sensible zone with mask

**URL:** <https://forum.kirupa.com/t/not-rectangular-mouse-sensible-zone-with-mask/240051>\
**Category:** Uncategorized\
**Created:** [September 28, 2007, 3:58pm UTC](https://forum.kirupa.com/t/not-rectangular-mouse-sensible-zone-with-mask/240051 "2007-09-28T15:58:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![giovapaglia](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@giovapaglia](https://forum.kirupa.com/u/giovapaglia)\
**Post date:** [September 28, 2007, 3:58pm UTC](https://forum.kirupa.com/t/not-rectangular-mouse-sensible-zone-with-mask/240051/1 "2007-09-28T15:58:05Z")

</div>

I have a containerSprite  
that contains two other DisplayObjects

- maskedSprite (contains dynamically Loaded Bitmap)
- maskingBitmap (dynamically Loaded)

Masking works fine  
but I’d like to have the masked content  
to respond to mouse events  
only in the actually visible area…  
instead  
mouse events trigger in all the rectangular area  
having the maskingBitmap dimensions…

Am I missing something really simple here?  
Shouldn’t the mask automagically shield masked zone from mouse events?

- Tried attaching eventsListeners to maskedSprite directly.
- Tried creating a maskedSpriteChild and attached events to it.
- Tried making maskingParentSprite containing dynamically loaded bitmap  
cause (as suggested in another message) I was trying to assign false  
value to mouseEnabled property to masking object, but this as a bitmap  
obviously complains…

Recall having done something similar in old swfs :elderly:  
but don’t really remember how it was and don’t really get  
how to do it now.

Any help and suggestion  
greatly appreciated

thanks  
Jo
