# Hittest mouse returns true outside stage

**URL:** <https://forum.kirupa.com/t/hittest-mouse-returns-true-outside-stage/183056>\
**Category:** flash\
**Created:** [March 23, 2006, 2:05pm UTC](https://forum.kirupa.com/t/hittest-mouse-returns-true-outside-stage/183056 "2006-03-23T14:05:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasper](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Rasper](https://forum.kirupa.com/u/Rasper)\
**Post date:** [March 23, 2006, 2:05pm UTC](https://forum.kirupa.com/t/hittest-mouse-returns-true-outside-stage/183056/1 "2006-03-23T14:05:24Z")

</div>

I’m using a hittest to check wether my mouse is inside a movieclip or not. The code works, but with flaw. When I move my mouse from over the MC to outside the stage (without passing any empty parts on the stage) it will act as if the mouse were still inside the MC. Why is this, and how can I solve it? It’s annoying the heck out of me!

This is my simple enough code:

```auto
 
  this.mc_viewer.onEnterFrame = animatecaption;
  function animatecaption():Void {
   if (this.hitTest(_xmouse, _ymouse, true)) {
     trace("showsomething");
   } else {
     trace("hidesomething");
   }
  }

```
