# Mouse listener

**URL:** <https://forum.kirupa.com/t/mouse-listener/157086>\
**Category:** flash\
**Created:** [July 29, 2005, 8:02pm UTC](https://forum.kirupa.com/t/mouse-listener/157086 "2005-07-29T20:02:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malidia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malidia/32/684_2.png) [@malidia](https://forum.kirupa.com/u/malidia)\
**Post date:** [July 29, 2005, 8:02pm UTC](https://forum.kirupa.com/t/mouse-listener/157086/1 "2005-07-29T20:02:23Z")

</div>

Hello,

Ok, i am trying to create a listener that will detect if the mouse is outside an area (an imaginary box if you will) and when it goes outside that box I want to put in a gotoAndPlay action, I know i have seen it done, but can’t find anywhere it has now and i don’t even know how to begin to make a listner, could anybody help with maybe some sample code i could borrow?

I am sure this will have to deal with if \_x.mouse is less than so and so or greater than so and so and \_y.mouse is less than so and so or greater than so and so, then gotoAndPlay, i think?
