# mouseX and mouseY

**URL:** <https://forum.kirupa.com/t/mousex-and-mousey/239263>\
**Category:** flash\
**Created:** [September 20, 2007, 12:39am UTC](https://forum.kirupa.com/t/mousex-and-mousey/239263 "2007-09-20T00:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dColumbus](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@dColumbus](https://forum.kirupa.com/u/dColumbus)\
**Post date:** [September 20, 2007, 12:39am UTC](https://forum.kirupa.com/t/mousex-and-mousey/239263/1 "2007-09-20T00:39:08Z")

</div>

Say I wanted to make sure that my mouse was within a certain “square area” of the movie… how would I detect that and then execute a function?

```auto

if(mouse is within this area)) {
    trace("BOOM!");
} else {
    trace("You are not within the bounds!");
}  

```
