
Welcome Guest
|
#1
|
|||
|
|||
|
I am having problems loading some external variables from a text file. Here is my text file:
NumAreas=5&area_list1=Blue+Mountains&area_list2=Ha waii&area_list3=Hunter+Valley&area_list4=Lady+Elli ot+Island&area_list5=Sydney Here is my ActionScript: Actionscript:
loadVariablesNum("AreaLabels", 0);
Areas = new Array();
for (i = 0; i < 5; i++) {
Areas[i] = _level0["area_list" + i];
}I have also tried: Areas[i] = _root["area_list" + i]; and Areas[i] = this["area_list" + i]; and Areas[i] = eval("area_list" + i); All of the values in the Areas[] array come out as undefined. Also, how would I convert NumAreas to an integer so that I can use it for the upper bound of my for loop? I have tried Number(NumAreas) and parseInt(NumAreas), but neither of those work. If anyone could help, that would be great. Thanks. I am currently in my third year of a Computer Science degree at the University of Colorado. I am quite fluent in C++ and also know some Perl and Java. It seems to me that Flash's ActionScripting language is far less intuitive than any of the other languages that I have studied. Is this just me, or do others feel this way? Justin |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| XML-file to Arrays | pake | XML & Sockets | 15 | 09-24-2006 01:53 PM |
| External images loaded into arrays | geminity | Actionscript 2.0 |
0 | 02-14-2005 07:12 PM |
| Ideas or script? timed dynamic text, arrays, and external text | rbruhn | Flash MX ActionScript |
0 | 07-08-2003 07:16 PM |
| loading variables from external file | pht | Flash MX ActionScript |
3 | 09-05-2002 10:57 AM |
| calling external files via arrays!! | Idan | Flash MX ActionScript |
2 | 06-13-2002 06:27 PM |




