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

查看:144
本文介绍了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:

一)使用urloader HTMLLoader中之前,检查HTTP状态

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

b)你可以读取html页面内容yourhtmlcontrol.htmlloader.window.document。如果这是一个已知的页面,您可以检测,如果该页面的内容对应的一些状态。

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.

我觉得一个)是比乙更可靠)。

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

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

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