Read Text File Line by Line

Hy all

Got the following code:

var strContent:String;
function fillContent(folder:String):void
	var arrayMenuItems:Array = new Array();
	var arrayContent:Array = new Array();
	var arrayNews:Array = new Array();
	var myContent:URLLoader = new URLLoader();
	myContent.dataFormat = URLLoaderDataFormat.TEXT;
	myContent.addEventListener(Event.COMPLETE, getString);
	myContent.load(new URLRequest("content/" + folder + "/_content.php"));
	contentText.multiline = true;
	trace("./content/" + folder + "/_content.php");
	trace("MY DATA: " +;
	contentText.htmlText = strContent;

function getString(e:Event):void
	strContent =;

What I actually need is to be able to read the _content.php file line by line. I’d like to store each line of the text file in an array (arrayContent). But I haven’t found ANY solutions yet for this problem.

Best thanks for trying to help :slight_smile: