I have a problem where I have a flash file that constantly loops. It reads 3 different variables from a txt file and outputs their data. I also have it refreshing the swf so that when I change data in the .txt file it updates it realtime in the swf without having to reload the file. but what I also need is a way to tell it to make an array a certain length to populate this data. And instead of a fixed size as it is right now, to make it X long where X is declared in the .txt file that i am using.
here is the code that im currently using:
loadVariablesNum("childdata.txt", 2);
imageNum = 0;
Ext = "image";
imagelist = new Array(ArreySize);
for (i = 0; i < ArreySize; i++)
{
imagelist* = Ext + (i + 1) + ".jpg";
}
and ArreySize is set to “3” right now for testing purposes.
my .txt file looks like this:
&test= true
&length= 3
&pic0= Julie Smith
&test0= 2
&check0= 3
&pic1= Jane Smith
&test1= 5
&check1= 6
&pic2= John Doe
&test2= 8
&check2= 9
now there is more code to it, but thats the code that i need to get the length variable from the .txt file and add it to the array size.
This thing is driving me bonkers. ive been working on this project for 2 days already.
ANY help would be greatly appreciated.
and i dont know if its important but im using flash 8 professional