在Flash AS3捕获未处理IOErrorEvent [英] Catching an unhandled IOErrorEvent in Flash AS3

查看:128
本文介绍了在Flash AS3捕获未处理IOErrorEvent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误#2044:未处理IOErrorEvent :.文本=错误#2036:加载从未完成

Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.

这是我所看到的每一次我尝试加载不存在使用装载机的图像。我得到的URL列表,如果他们指着有用的东西无法验证。每当遇到404它给我的错误。

That's what I see every time I try to load an image that doesn't exist using a Loader. I'm getting a list of URLs and can't validate if they're pointing to anything useful. Whenever it encounters a 404 it gives me that error.

我试图捕捉每可用IOErrorEvent错误有(有其中的7),但没有人似乎捕捉到404有没有,我可以找赶上这种情况下其他一些网络事件?!我觉得我失去了一些东西明显。

I have tried to catch the error with every available IOErrorEvent there is (there are 7 of them),but none of them seem to capture the 404. Is there some other network event that I can be looking for to catch this condition?! I feel like I'm missing something obvious.

我真正喜欢的是能够不顾赶上其描述的事件,只是对付它......有点像

What I'd really like is to be able to catch the event regardless of its description and just deal with it... sort of like

myLoader.addEventListener(IOErrorEvent *,dealWithError。);

myLoader.addEventListener(IOErrorEvent.*, dealWithError);

但是,这是非法的。我甚至尝试追赶

But that's illegal. I even tried catching

HTTPStatusEvent.HTTP_STATUS

HTTPStatusEvent.HTTP_STATUS

但从来没有叫回来,因为,我想,它就会HTTP状态它处理的错误事件之后,因此,因为它未能在未处理错误事件,它只是会丢失。是否有没有在我俯瞰IDE的事件?

but that never calls back because, I guess, it gets the HTTP status after it deals with the error events, so, as it fails on the "unhandled" error event, it just gets lost. Are there events that aren't in the IDE that I'm overlooking?

所有帮助AP preciated。

All help appreciated.

推荐答案

如果您使用的是装载机;尝试添加事件监听到装载机的contentLoaderInfo,如:

if you are using a loader; try adding the eventListener to the contentLoaderInfo of the loader, e.g.

myLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loaderIOErrorHandler);

这篇关于在Flash AS3捕获未处理IOErrorEvent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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