know network status in Air ::
Check this a Usefull tip for Air apps connecting to web
import air.net.SocketMonitor;
import air.net.ServiceMonitor;
import flash.events.StatusEvent;
var socketMonitor:SocketMonitor;
function onInit():void
{
NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, onNetworkChange);
socketMonitor = new SocketMonitor(‘192.168.2.56′,80);
socketMonitor.addEventListener(StatusEvent.STATUS, socketStatusChange);
socketMonitor.start();
}
function onNetworkChange(e:Event):void {
trace(e+” Status change. Current status: ” );
}
function socketStatusChange(e:StatusEvent):void {
trace(“Status change. Current status: ” + socketMonitor.available);
}
