尽管URLLoader在Flash Builder Mobile Debugging中正常工作,但它并未在Android Mobile上调度Event.COMPLETE事件。代码片段如下:URLLoader不适用于Flex 4.6适用于Android的移动项目
private function loadAlbumData():void
{
var request:URLRequest = new URLRequest("https://picasaweb.google.com/data/feed/api/user/default");
var urlloader:URLLoader = new URLLoader();
urlloader.addEventListener(Event.COMPLETE, onLoadComplete);
urlloader.load(request);
}
private function onLoadComplete(evt:Event):void
{
trace(evt.currentTarget.data);
}
这里我要求Google的Picasa服务提供一个Album XML。
监听错误事件,看看他们告诉你什么:'SecurityErrorEvent.SECURITY_ERROR','HTTPStatusEvent.HTTP_STATUS','IOErrorEvent.IO_ERROR' – RIAstar 2013-04-20 11:26:58
@RIAstar我是对的。它引发IOErrorEvent.IO_ERROR。跟踪显示 “[IOErrorEvent type =”ioError“bubbles = false cancelable = false eventPhase = 2 text =”错误#2032:流错误。 URL:https://picasaweb.google.com/data/feed/api/user/default“errorID = 2032”“ – Asad 2013-04-24 04:58:08