# Help with workaround!

**URL:** <https://forum.kirupa.com/t/help-with-workaround/245154>\
**Category:** Uncategorized\
**Created:** [November 27, 2007, 12:41am UTC](https://forum.kirupa.com/t/help-with-workaround/245154 "2007-11-27T00:41:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrex](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rrex](https://forum.kirupa.com/u/rrex)\
**Post date:** [November 27, 2007, 12:41am UTC](https://forum.kirupa.com/t/help-with-workaround/245154/1 "2007-11-27T00:41:34Z")

</div>

hello,

I’ve been trying to use the hittest onMouseMove workaround to add some basic motion to a menu of buttons. Using the code below, I am able to get the movie clip (controls\_btn) to play on “RollOver,” but it won’t play when I “RollOff.”

Any help would be deeply appreciated.

controls\_btn.isPressed = false;  
controls\_btn.isOver = false;

controls\_btn.onMouseMove = function(){  
var lastIsOver = this.isMouseOver;  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.isMouseOver = true;  
if (this.isMouseOver != lastIsOver){  
if (this.isPressed){  
this.gotoAndPlay(11);  
}else{  
this.gotoAndPlay(2);  
}  
}  
}else{  
this.isMouseOver = false;  
if (this.isMouseOver != lastIsOver){  
if (this.isPressed){  
controls\_btn.gotoAndPlay(2);  
}else{  
controls\_btn.gotoAndPlay(11);  
}  
}  
}  
}
