hi,
i have this script to animate my button.
so fare it works fine. the buttons are mc and have three states: one for up, one for over and one for press.
when first loading the swf, i want to have the first button already in the ‘press’ status.
i tried to do it with this:
but1.mc_butup._visible = false;
but that confuses my function of the button states.
Any help is appreciated. Thank you
_selassi
this is the scrip i have so far:
var buttonActive;
_global.buttonRelease = function(which) {
if (buttonActive != nil) {
with (buttonActive) {
mc_butover._visible = false;
mc_butup._visible = true;
}
}
};
for (i=1; i<=4; i++) {
with (_root["but"+i]) {
butOn = false;
mc_butover._visible = false;
}
_root["but"+i].onPress = function() {
_global.buttonRelease(buttonActive);
this.mc_butup._visible = false;
this.mc_butover._visible = false;
butOn = true;
buttonActive = this;
};
_root["but"+i].onRollOver = function() {
if (buttonActive != this) {
this.mc_butover._visible = true;
} else {
this.mc_butover._visible = false;
}
};
_root["but"+i].onRollOut = function() {
this.mc_butover._visible = false;
};
}