I’ve got 7 buttons with instance names btn1, btn2, etc. I’ve also got 7 white square movieclips to alpha in over the button when one of the buttons is rolled over. To shorten code I’m using a loop.
for (var i = 1; i <= 7; i++){
var btn = this["btn"+i];
btn.id = i;
var mc = this["mc"+i];
btn.onRelease = function(){
trace(this.id);
_root.attachMovie("flashemo"+this.id,"fe"+i, i);
}
btn.onRollOver = function() {
mc.alphaTo(70, 0.5, "easeOutQuad", 0);
}
btn.onRollOut = function() {
mc.alphaTo(0, 0.5, "easeOutQuad", 0);
}
}
But my rollover effect isn’t working. If i replace mc with mc1 or whatever in the code it does work. Any suggestions?