篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 Adobe AIR - 检测网络连接相关的知识,希望对你有一定的参考价值。
private var monitor:URLMonitor;
// This is just an example of a function called after application creation complete
private function handle_creationComplete():void
{
monitor = new URLMonitor( new URLRequest("http://www.someaddress to check against") );
monitor.addEventListener( StatusEvent.STATUS, handle_status );
monitor.start();
}
private function handle_status ( event:StatusEvent ):void
{
trace(monitor.available);
}
以上是关于ActionScript 3 Adobe AIR - 检测网络连接的主要内容,如果未能解决你的问题,请参考以下文章