I am trying to create multiple variables from quite a big NOTEPAD / Txt file that would be constanly changing.
The notepad file would look something along the lines of:
[LEFT]heading1=Hello!&heading2=How r u?&heading3=Great Day… … &heading50=WOOT!!![/LEFT]
etc.
I am trying to generate multiple variables in Flash MX 2004 for each of those “headings”
In Flash I’ve tried things along the lines of:
loadTxt = new LoadVars();
loadTxt.load(“headings.txt”);
loadTxt.onLoad = function() {
for (i=1; i<50; i++) {
heading* = this.heading*
}
};
but the variables never seems to register (i make dynamic txt boxes and give them variable names like: heading1, heading 2 etc.).
Also, the only reason I had “i<50” is because I don’t know how to make the function stop looping when it gets to a heading that doesn’t exist, so, um, how would you make it stop when it reaches a non-existent heading or the end of the text file?
Thanks Heaps!