# Button question

**URL:** <https://forum.kirupa.com/t/button-question/39933>\
**Category:** Uncategorized\
**Created:** [January 13, 2004, 12:46am UTC](https://forum.kirupa.com/t/button-question/39933 "2004-01-13T00:46:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlkedave](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mlkedave](https://forum.kirupa.com/u/mlkedave)\
**Post date:** [January 13, 2004, 12:46am UTC](https://forum.kirupa.com/t/button-question/39933/1 "2004-01-13T00:46:14Z")

</div>

I have a question with buttons… I am using this code:  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.nextFrame();  
} else {  
this.prevFrame();  
}  
}

to rewind and play a movieclip depending on if the mouse is over the button. The only problem is I want it so when you release the botton (onRelease), then The button changes color (until another button is chosen, in which case that button changes color and the origignal button changes back). How do I make it so when onRelease the button GotoAndPlays another frame? Any suggestions? Thanks.

Mike
