Flex MX:HTML 处理错误和加载问题 [英] Flex MX:HTML handling errors and loading problems

查看:19
本文介绍了Flex MX:HTML 处理错误和加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的 mx:html 加载页面..我想在加载页面出现问题时显示一个弹出窗口...

I have a simple mx:html that load a page.. I'd like to show a popup when there is a problem loading the page...

我该如何处理这个事件?我在网上找不到任何有用的东西:(

How can I handle this event? I have not find anything useful on the web :(

推荐答案

mx:html 基于 htmlloader,不幸的是您无法使用此对象读取 HTTP 标头,因此您无法读取 HTTP 状态.几种解决方法是:

mx:html is based on htmlloader, and unfortunately you cannot read HTTP headers using this object, so you cannot read the HTTP status. Several workarounds are:

a) 在 htmlloader 之前使用 urloader 并检查 HTTP 状态

a)use an urloader before the htmlloader and check the HTTP status

b) 您可以使用 yourhtmlcontrol.htmlloader.window.document 读取 html 页面内容.如果是已知页面,您可以检测页面内容是否符合某种状态.

b)you can read the html page content with yourhtmlcontrol.htmlloader.window.document. If it's a known page you can detect if the page content corresponds with some status.

我认为 a) 比 b) 更可靠.

I think that a) is more reliable than b).

这篇关于Flex MX:HTML 处理错误和加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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