Hey guys, How would I access the first element of this array first entering the frame. I want to get buttons[0], or brandingbtn, to be activated.
var currentButtonId:Number = 0;
var buttons:Array = [brandingbtn, printbtn, packagingbtn, mltimda, typebtn, funbtn];
buttonCall();
function buttonRelease() {
for(var i:Number = 0; i < buttons.length; i++) {
if(this.id == buttons*.id) {
currentButtonId = i;
buttons*.index = i;
buttons*.gotoAndStop(2);
buttons*.enabled = false;
trace(i);
} else {
buttons*.gotoAndStop(1);
buttons*.enabled = true;
}
}buttonCall();
}
brandingbtn.id = 0;
printbtn.id = 1;
packagingbtn.id = 2;
mltimda.id = 3;
typebtn.id = 4;
funbtn.id = 5;
Thanks