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: " + myContent.data);
contentText.htmlText = strContent;
contentText.setTextFormat(format_ContentRegularText);
contentTitle.setTextFormat(format_Titles);
menuItemFont.setTextFormat(format_MenuItems);
}
function getString(e:Event):void
{
strContent = e.target.data;
}
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
Regards