Website menu problem

Hello. I’m building a website entirely in flash to showcase my portfolio. I used a tutorial that I found online that uses an XML file and actionscript. However, I want to make adjustments to part of it and I’m not sure how.

I have a menu that is a movie clip with a rollover effect. The words that appear on the menu sections come from the XML file. The rollover effect was done in flash in the movie clip. The menu sections start black. When the user rolls over 1 of the sections, it turns brown. I want it to stay brown when the user clicks on that section. I looked on a few forums and it was suggested that I add this to the action script:

pressedButton.onRollOut = function():Void {
if (this.highlightedButton == true) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
pressedButton.onPress = function():Void {
this.highlightedButton = true;
this.gotoAndStop(2);
…all the remaining code for the function goes here…
};

I did that, but now the buttons stay brown. They don’t go back to black when another section is chosen. It was suggested to “create a variable that will store a reference to the currently clicked button, so when another button is clicked, the previous one will become black again and the new one brown.”

Problem is, I don’t know enough about actionscript to know how to do this. Can anyone help?