Okay so I am new to using txt files, and not too great with arrays, but I think I should have this right. But when I try to trace the array, I get undefined!
I found this on another thread, and changed it accordingly.
_root.textArray = new Array();
_root.text_lv = new LoadVars();
_root.text_lv.onLoad = function(success) {
if (success) {
_root.textArray = this.texts.split(",");
}
};
_root.text_lv.load("links.txt");
trace(_root.textArray[0]);
I changed a few thigns such as adding _root cause I thought maybe for some reason it was scope, but that didn’t fix it. But if I trace it inside the success if, I get the proper trace! WHY?