Each button indicates which page is currently being viewed. I want the home page loaded by default, with the home button inactive whilst showing its overstate. The only way I can think of doing this is adding the onLoad function:
stop();
function reActivateMenu () {
button1_mc.gotoAndStop(1);
button1_mc.enabled = true;
button2_mc.gotoAndStop(1);
button2_mc.enabled = true;
button3_mc.gotoAndStop(1);
button3_mc.enabled = true;
menu.button4_mc.gotoAndStop(1);
menu.button4_mc.enabled = true;
}
// ---- onRollOver, onRollOut, and onRelease event handlers for the buttons
button1_mc.onRollOver = function () {
this.gotoAndStop(2);
}
button1_mc.onRollOut = function () {
this.gotoAndStop(1);
}
button1_mc.onRelease = function () {
reActivateMenu();
this.gotoAndStop(2);
this.enabled = false;
loader_mc.loadMovie(“home.swf”);
}
onLoad = function () {
button1_mc.gotoAndStop(2);
loader_mc.loadMovie(“home.swf”);
}
This actually works, but only until the first rollover (not click) when the home button returns to its up state. Is there a better way of doing this?