/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import air.net.URLMonitor; import flash.net.URLRequest; import flash.events.StatusEvent; var monitor:URLMonitor = new URLMonitor(new URLRequest(‘http://www.enginyoyen.com’)); monitor.addEventListener(StatusEvent.STATUS, checkHTTP); monitor.start(); function checkHTTP(e:StatusEvent) { if (monitor.available) { test_txt.text ="Internet is available"; } else { test_txt.text ="No internet connection available"; } }
Comments
