HI
I can load HTML inside AS3. My problem is to have a way to display an error message if the path is incorrect and does not exist.
Here is my code:
var path:String = “http://www.eyerix.net/pt/w/teste”;
// this will load the HTML page
function textLoadComplete(event:Event):void
{
var xmlMenuContent:XML = new XML(textLoader.data);
trace(xmlMenuContent);
}
var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest = new URLRequest(path);
textLoader.addEventListener(Event.COMPLETE, textLoadComplete);
try {
textLoader.load(textReq);
}
catch(err:Error) {
trace("-- /////");
trace(err.message);
//outputBox.appendText(err.message);
//checkChances(“0”);
trace("/////");
}
I need help unserstanding what am I doing wrong because I can’t trace the error.
Thanks