Check for internet connection in Flash?

落花浮王杯 提交于 2019-12-06 02:04:06

If you are using AIR, you can use the ServiceMonitor class.

Otherwise you might want to consider rolling your own with a URLLoader coupled with a timer with an exponential backoff.

to expand on martineno's answer about rolling your own using the URLLoader, read about the HTTPStatusEvent in the documentation.

at the end of the document Adobe includes an example for checking for the existence of a file on a server, but the same could be applied to simply check for an internet connection.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!