Hi,
I have a movie clip button that has 3 states:
up, over, out, and press.
the action script inside the movie clip button looks like this:
stop();
onRollOver = function () {
this.gotoAndstop("_over");
};
onRollOut = function () {
this.gotoAndstop("_out");
};
onPress = function () {
this.gotAndstop("_press");
};
on the stage, I have several instances of this button mc.
when the button is clicked, it loads an external file into a container on the stage.
the action script looks like this:
button_1.onRelease = function() {
_root.holder1.loadMovie(“image_1.swf”);
_root.button_1.enabled = false;
this.useHandCurser = false;
_root.button_2.enabled = true;
_root.button_2.gotoAndStop("_up");
_root.button_3.enabled = true;
_root.button_3.gotoAndStop("_up");
};
button_2.onRelease = function() {
_root.holder1.loadMovie(“image_2.swf”);
_root.button_2.enabled = false;
this.useHandCurser = false;
_root.button_1.enabled = true;
_root.button_1.gotoAndStop("_up");
_root.button_3.enabled = true;
_root.button_3.gotoAndStop("_up");
};
button_3.onRelease = function() {
_root.holder1.loadMovie(“image_3.swf”);
_root.button_3.enabled = false;
this.useHandCurser = false;
_root.button_1.enabled = true;
_root.button_1.gotoAndStop("_up");
_root.button_2.enabled = true;
_root.button_2.gotoAndStop("_up")
};
and so on.
Now, I have 12 buttons for each section. Is there a better way to do this with variables?
If you can help me I’d really appreciate it.
thank you