[flash 8] custom button class help (newbie)

Hi, I have a custom button class I need help with.

The class has 4 different cases which go to frame names
onRollOver => goes to “over”
onRollOut => goes to “normal”
onPress => goes to “down”
onRelease => goes to “inSection” (i.e. to show the user that they are in “that section”)

I am having problems with the last part. I want my button to look the way it does on the “inSection” part of the timeline, and to stay that way until the user selects a different section. Then I want that particular button to go back to “normal” (since they aren’t in “that section” anymore)

I’m also wondering if this approach is a bad idea, because I have other functions that happen on the main timeline, outside of this class when the movie clip has a “onRelease” event (i.e. loads a clip).

Can anyone help?

Here is the code below:

[COLOR=Black]**class menuButton extends MovieClip {
private var menuText:MovieClip;
private var menuLabel:String;

private var section:Boolean = false;

function menuButton(menuLabel) {
    init();
}
private function init(menuLabel):Void {
    menuText.buttonText.text = menuLabel;
}
private function onRollOver():Void {
    if (section == false) {
    this.gotoAndPlay("over");
    }
}
private function onRollOut():Void {
    if (section == false) {
    this.gotoAndPlay("normal");
    }
}
private function onPress():Void {
    if (section == false) {
    this.gotoAndStop("down");
    }
}
private function onRelease():Void {
    if (section == false) {
    this.gotoAndStop("inSection");
    section = true;
    } else {
        this.gotoAndPlay("normal");
        section = false;
        }
}

}**[/COLOR]