I’ve got about 50 buttons onstage with names like btn1a_mc, btn2B_mc, etc. Each one loads an external swf (called “Monosem1Aslideshow.swf”, where the “1A” corresponds to the button name.) into a movieclip holder called slideHolder_mc. I’m trying to use an array instead of writing code for each button. I’m using the following:
buttonNumber = ["1A", "2B", "3C", "4D", "1E", "2F", "3G"];
for(i=0; i<buttonNumber.length; i++){
var btnName:String = "btn"+*+"_mc";
MonosemBtns_mc.btnName.onRelease = function(){
loadMovie("002Assets/Monosem"+*+"slideshow.swf", slideHolder_mc);
};
};
But I can’t seem to get it to work. I’m a little shaky on array syntax and can’t find a tutorial that addresses my particular problem.
Any help would be appreciated!