Advanced button help

I am using the following AS for all of my buttons:
[AS]
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
[/AS]

The thing is I have 5 buttons and want to make it so when one button is clicked, it stops at the last frame (doesn’t activate the prevFrame and also checks to see if any of the other buttons were clicked to return them back to normal. I have no clue how I do this cause no matter what that “else” statment keeps getting triggered. Does anyone know how to do this? Thank you tremedously.

Mike