First I use URLRequest to read a txt file contain multiple lines of String
var urlRequest:URLRequest = new URLRequest("listOfJsonFile.txt");
and I had created a array
private var listOfJson:Array = new Array();
Then I split each string into array
var loader:URLLoader = URLLoader(event.target);
listOfJson = loader.data.split(/\n/);
trace(listOfJson[0]); // return XXX.Json
Question:
How can I do:
var urlRequest:URLRequest = new URLRequest(listOfJson[0]);
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error.
I have try create a temp var string or cast the element to String().
I did: var urlRequest:URLRequest = new URLRequest("XXX.json");
and it work.