Hi everyone!
Im a newbie at Flash and I would really really appreciate any help offered by you guys!=)
Anyways, I am trying to load an array from a text file and display it onto a text field.
This is what i am trying to load:
test.txt:
&testarray[0].name = “John”;
&testarray[0].address = “City”;
This is a sample of my code:
function load_data () {
mydata = new LoadVars();
mydata.load(“test.txt”);
mydata.onload = function(success) {
if(success) {
trace(“Loaded”);
myArray = new Array ();
myArray[0] = this.testarray[0].name;
myArray[1] = this.testarray[1].address;
textbox1.text = myArray;
}
else trace(“error loading”);
}
}
Thanks once again for helping me!=)