I’m able to read a .txt file on my server that contains two separate umbers on two separate lines. The .txt file looks like this:
3
5
I’m trying to get those two numbers into my as3 script as separate variables, in this case within an array. Here’s my loader:
function loadComplete(e:Event):void
{
outputTxt.text = e.target.data;
var stats:Array = outputTxt.text.split("
");
trace(String(stats[0]));
}
But for some reason, both variables load into the first part of the array (stats[0]) and nothing loads into stats[1]. The textfield failed to split into two numbers within the array. Any suggestions?