Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic text in dynamically generated MCs 1

Status
Not open for further replies.

flashbbeb

MIS
Mar 29, 2005
106
US
I'm trying to populate a dynamic text box with a number that iterates in a loop. The text box is in a serious of dynamically generated movie clips - here's a clip of the code:

for(i=1;i<=answerCh;i++)
{
attachMovie("answerchoice","ac"+i, i);

//"ac"+i.choiceletter = i; //my attempt
}

How do I get each MC's dynamic text box to populate with "i"?

Thanks,
EB
 
for(i=1;i<=answerCh;i++)
{
attachMovie("answerchoice","ac"+i, i);
ac1.choiceletter = A;
ac2.choiceletter = B;
ac3.choiceletter = C;
ac4.choiceletter = D;
ac5.choiceletter = E;

I added this (it works), but was hoping there was a way I could do it dynamically within the loop with a method using the "ac"+i.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top