Return to Snippet

Revision: 22238
at January 6, 2010 16:42 by BoNzO


Initial Code
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";
}
}

Initial URL

                                

Initial Description

                                

Initial Title
Check connection in AS3

Initial Tags
Flex

Initial Language
ActionScript 3