Load Data from Textfile into Variables for FOR-Loops


I’m new in this Forum, so I’m quite unfamiliar with it by now.
If I’m posting wrong, please tell me so I can learn

My Question:

I’m making something like a dynamic Picture Viewer, wich should display Pictures named by photo1, photo2, etc. dynamically from an url I give the viewer as a parameter. Thats not my problem by now, my problem is that I try to give the viewer few “parameters” through a text-file


I load this file like this

loadNumber = new loadVars();

loadNumer.onLoad = function()
/* - And here’s the problem: I want to load the variable not into a
textbox, but into a variable like i for example, so I tried it like this*/


//outside the function i tried this


//I tried to reassign directly into i (inside the onLoad-function), like this


I tried a lot but, didn’t succed to get the data from the textfile into
i so i can use it like this

for (k=1; k==i; k++)

or to use it for other purposes.

If someone nows an answer, please help,

Like I said I’m new with this, if I’m posting wrong, or if the problem is to easy for this forum I’m sorry.

Thanks for the help