在网络错误的Chrome AS3的URLLoader不同的行为 [英] Chrome AS3 URLLoader different behavior on network error

查看:162
本文介绍了在网络错误的Chrome AS3的URLLoader不同的行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome浏览器在网络错误,在错误处理事件对象的行为不同于IE浏览器和Flash播放器(即直接运行SWF,而不是从浏览器)。请看下面的测试code:

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;
}

在IE浏览器和Flash Player,debugField节目

In IE and flash player, debugField shows

error : Error #2032: Stream Error. URL: http://www.jsfbjdsssde.com

但在Chrome浏览器是

but in Chrome it is

error : Error #2032

这是URL从文本剥离。这是为什么不同?任何人都可以提出任何办法让错误处理程序的网址是什么?或者,这是Chrome浏览器本身?

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?


我的浏览器版本是5.0.375.86


My Chrome version is 5.0.375.86

推荐答案

我没有检查这一点,但它很可能你已经安装在Chrome浏览器的Flash插件(而非调试版本)的发布版本。调试输出在释放玩家更简洁。

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.

这篇关于在网络错误的Chrome AS3的URLLoader不同的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆