I try to read a txt file and split the content into variables, I use the following:
var fileURL = fl.browseForFileURL("open", "Select file");
var str = FLfile.read( fileURL);
the problem is the str get the whole test file, if the text file has multiple line,
can I read the file each line by line, such as a function like readLine or something,
so the str only get information for each line?
Thanks a lot
you'll need to parse the text using the flash string and array methods.
thanks Kglad! so there is no way I can read one line, do something, then read another line, do something?
no, you'll read the entire file, parse it and then access whatever line/variable you want.