AS3:loading XML is not working after exporting the air file?

Posted by Tarek Said on Stack Overflow See other posts from Stack Overflow or by Tarek Said
Published on 2012-12-08T14:43:11Z Indexed on 2012/12/08 17:03 UTC
Read the original article Hit count: 244

Filed under:
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;

names();

function names()
{

var url:URLRequest = new URLRequest("http://artbeatmedia.net/application/xmlkpisname.php?username=adel_artbeat&password=ADL1530");
url.contentType = "text/xml";
url.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.load(url);
loader.addEventListener(Event.COMPLETE, onLoadComplete);

}
function onLoadComplete(event:Event):void
{
trace('good');
}

i used adobe air to load xml using as3,this code works only in the .fla file,but when i export the .air file it does not work.

© Stack Overflow or respective owner

Related posts about actionscript-3