开发者

Chrome AS3 URLLoader different behavior on network error

In开发者_运维技巧 Chrome upon network error, the event object in error handler is behaving differently than IE and flash player (i.e. directly running the swf, not from the browser). Consider the following test code :

private function loadData():void {
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
    loader.addEventListener(Event.COMPLETE, onColmplete);
    loader.load(new URLRequest("http://www.jsfbjdsssde.com"));
    debugField.text = "loading";    // this is a TextField
}

private function onColmplete(evt:Event):void {
    debugField.text = "complete";
}

private function onError(evt:IOErrorEvent):void {
    debugField.text = "error : " + evt.text;
}

In IE and flash player, debugField shows

error : Error #2032: Stream Error. URL: http://www.jsfbjdsssde.com
but in Chrome it is
error : Error #2032
That is URL is stripped from the text. Why this is different? Anyone can suggest any way to get the URL in error handler? Or is this a bug of Chrome itself?

My Chrome version is 5.0.375.86


I have not checked this, but it's quite likely that you have the release version of the flash plugin installed in Chrome (instead of the debug version). Debugging output is less verbose in the release player.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜