LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-18-2002, 03:13 AM
jschell jschell is offline
Registered User
 
Join Date: Oct 2002
Posts: 7
Rep Power: 0
jschell is on a distinguished road
Question Arrays and External Variables

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
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 08:57 PM.