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!

Array variables in dynamic text

Status
Not open for further replies.

JontyMC

Programmer
Nov 26, 2001
1,276
GB
I'm trying to use array variables in a dynamic text box. Its not working. Does flash not allow this?

Thanks,

Jon
 
if im right,

the problem here lies in how you name your dynamic text box. Exactly how were u trying to accomplish this? Pls elaborate alot! that way we can work out the problem asap.

biggie

ps

if you post your fla for download and state exactly how you would like it to be then it might make things a lot faster.
 
Hi,

I have an array:

ModernChoice = new Array("s", "s", "d", "d", "s");

And I want to display it in a table I created. I made a dynamic text box for each array entry and then entered the variable in the first one as ModernChoice[0] in the second one as ModernChoice[1], etc. This didnt work. Any ideas?

Thanks for the help,

Jon
 
rename your dynamic text as follows:


ModernText0
ModernText1
ModernText2
ModernText3
ModernText4



ModernChoice = new Array("s", "s", "d", "d", "s");


Code:
for (i=1; i<=totalGroupArray; i++) {
    tempMain = &quot;_root.main&quot;+i;
    set (&quot;_root.ModernText&quot;+i, _root.ModernChoice[i]);
}


provided all ur variable are on the _root.


hope this clear things up!



biggie

 
Thanks, I'll try that. Seems a bit silly that array variables cant be used this way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top