PDA

View Full Version : reading a txt file


AZmoon
06-13-2005, 10:13 AM
Basicly is there a way a swf file can get the content of a txt file?

Gibberish
06-13-2005, 05:47 PM
myTxt = new LoadVars();
myTxt.load("someText.txt");
myTxt.onLoad = function(success){
if(success){
//text has loaded so do this
}else{
trace("TEXT FAILED TO LOAD!");
}
}

I think some people use loadVariablesNum() also.

AZmoon
06-14-2005, 02:23 AM
mmm but how do I play with the contents?

Basicly here is my situation,
I have a few arrays, that are currently hard coded in the _root.
So now I need them to be populated from an text file,

Does anyone know any tutorials on this?

TimDiacon
06-14-2005, 02:52 PM
what is the info you need to load and what do you want to do with it when it loads - fill a text field, populate a combo box etc?

AZmoon
06-17-2005, 02:00 AM
the array contains numbers, and they are going to be the _x and _y of my objects when I attach them.