hi all,
i have a bunch of buttons (with textboxes in them) on the stage, each called butt1, butt2, butt3, butt4 and i want to loop through them but i’m unsure how to target their text property inside the loop
this is what i have:
butt1.text = “button1”;
butt2.text = “button2”;
.
.
.
this is what i want to achieve:
// loop through the butonCount
for (i=1; i’<'buttonCount; i++) { //excuse the quotation binding the less-than sign
butt*.text = "button" + i;
}
it’s the butt* bit that i’m unsure about
i tried holding the name in a var and then targetted its text prop like:
theButton = “butt” + i ;
theButton.text = “button” + i;
but that doesn’t work (i guess it;s just a variable value and as such it has no properties
do i need to create a button array (?)
thanks all
:crazy: