# Masking porblem

**URL:** <https://forum.kirupa.com/t/masking-porblem/317099>\
**Category:** Uncategorized\
**Created:** [December 10, 2010, 2:02pm UTC](https://forum.kirupa.com/t/masking-porblem/317099 "2010-12-10T14:02:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vfistri1](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@vfistri1](https://forum.kirupa.com/u/vfistri1)\
**Post date:** [December 10, 2010, 2:02pm UTC](https://forum.kirupa.com/t/masking-porblem/317099/1 "2010-12-10T14:02:06Z")

</div>

So basically i have somth like on picture attached, now i place a lot of small boxes in either square 1 or square 2 area,and i can’t know where small box will be placed.  
now i’m trying to make a function that checks if y-cords of small box is in square 2 and make some action. Think it shouldn’t be smth difficult, tried some if statement but coudn’t get math to work. so can som1 mybe help me work math out or suggest some more simple sollution?

also the hierarchy is like this  
addChild(holder);  
addChild(mask)  
holder.mask = mask;  
holder.addChild(smallBox);
