Hi. I have a function that loops inside a movieclip with 7 btns that tells what collor the last hit btn should be and what collor the rest should look like. The problem is that after I hit one btn, I cant make the object btn function as a btn, with the rollover and others btn frame properties.
Here is the function:
// define a funcao mA2click (menu A)
function mA1click() {
for (var a=1; a<8; a++) {
var btn = _root.mA1["A1"+a];
if (btn == this) {
hitColor = new Color(this);
hitColor.setRGB(0xff0000);
clickSound = new Sound(btn);
clickSound.attachSound("click");
clickSound.start(0, 3);
this.enabled = false;
} else {
normalColor = new Color(_root.mA1["A1"+a]);
normalColor.setRGB(0x333333);
_root.mA1["A1"+a].enabled = true;
_root.mA1["A1"+a].onRollOver = _root.mouseOver(this);
}
}
}
for (var a=1; a<8; a++) {
_root.mA1["A1"+a].onRelease = mA1click;
}