AS3 loadVars and arrays
I have a text file with variables and an swf that a friend made for me. Unfortunately i dont have the .fla file and i am trying to recreate it.
the file contains 3 variables with values, repeated 4 times and a final variable (called varDone) that tells it there are no more variables.
The three variables are varImage, varURL, varText. These are used to load images that can be clicked to open a website and they have a textfield above them.
The flash is a banner that we use on our site to display these images. Somehow, he reads the first set of variables into a movieclip i believe, where the image then fades in and stays on screen for 3 more seconds and then goes onto the next image. He keeps reading variables from the file until he hits that varDone=1 variable, then the banner starts all over. The file is such that I can add as many sets of variables as i want, and it will display all of them, it could be 3 or 10 or 30, as long as i add a new set of (varImage, varURL, varText) to the file ahead of the varDone variable. I thought maybe he might be loading those 3 variables into a two dimensional array and then processing them that way. This is the part I don't know how to do, how to read each set of variables, until i get to the varDone=1. I can do all the other stuff, I just don't know how to read this file.
It looks like the following:
&varImage=http://www.mofc-gaming.com/themes/CT_RN_GREYSCALE/images/spotlight1.jpg
&varHeadline=RECRUITING BAD COMPANY 2 MEMBERS
&varLink=http://badcompany2.ea.com/#/home
&varImage=http://www.mofc-gaming.com/themes/CT_RN_GREYSCALE/images/spotlight2.jpg
&varHeadline=Join MOFC in EVE Online
&varLink=http://www.eveonline.com
&varDone=1