# \[help\] mouse hittest problem

**URL:** https://forum.kirupa.com/t/help-mouse-hittest-problem/112940
**Category:** Uncategorized
**Created:** [June 13, 2004, 9:14am UTC](https://forum.kirupa.com/t/help-mouse-hittest-problem/112940 "2004-06-13T09:14:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Skinny\_T](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Skinny\_T](https://forum.kirupa.com/u/Skinny_T)
#### Post date: [June 13, 2004, 9:14am UTC](https://forum.kirupa.com/t/help-mouse-hittest-problem/112940/1 "2004-06-13T09:14:54Z")

</div>

Before I start, yes I did search and couldn’t find the answer.

OK, here’s my problem. I have a button which goes to frame 2 to reveal the movieclip i need  
What I need is a hittest where the mouse has to roll onto the movieclip before it goes back to frame 1 when you roll back off it.  
Here’s the code I tried doing it with.

```auto

onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
			_root.startmenu.gotoAndStop(1);
		}
	}
} 

```
