Adobe iPhone Publisher: URLLoader aborts app on iPad
I am creating an iPad app with Flash CS5. In my app, I am trying to load some dynamic XML from a server. Whenever I click the button to initiate the load, the app immediately aborts and I am taken back to the desktop. Here is my load routine that is run when the button is clicked:
protected function SendRequest():void
{
var url:String = GetURL();
var request:URLRequest = new URLRequest(url);
request.method = URLRequestMethod.POST;
request.data = GetVariables();
var loader:URLLoader = new URLLoader();
try
{
loader.load(request);
ec.add(loader, IOErrorEvent.IO_ERROR, OnIOError, false, 0, true);
ec.add(loader, Event.COMPLETE, OnRequestComplete, false, 0, true);
}
catch (error:Error)
{
response_txt.text = error.message;
}
}
I have tested this app on my desktop computer within开发者_如何转开发 CS5 and it works fine there.
Is it the sandbox security problem? Maybe you need to check the crossdomain.xml file...
精彩评论