Button instance names stored in array not working.
Newbie here.
I created an array containing the instance names of 6 buttons - for example:
window.myBtns = ["a1_mc","a2_mc","a3_mc","a4_mc","b1_mc","b2_mc","b3_mc","b4_mc"];
When if go to loop through the array to pull the button instance names and assign the nested text field a value from another array I receive an error message saying "' is undefined. Here's my loop:
for (let i = 0; i < selQues.length; i++) {
switch (i) {
case 0:
for (let k = 0; k < selQuesSets[i].length; k++) {
var myMC = queABtns[k];
myBtns[k].myTxt_txt.text = selQuesSets[0][k].value;.
}
break;
}
}
What am I doing wrong?
Another question. If I declare my array on frame 0, its undefined on frame 25 where I need to use it. How do I declare an array on frame 0 that's accessable throughout the timeline? Is it because the buttons are not used until frame 25?
