actionscript 3 - Adobe Flash Builder Mobile - Check Internet connection and choose view -


is possible check internet connection, choose view according connection/no connection?

thanks

maybe following code useful:

<?xml version="1.0" encoding="utf-8"?> <s:viewnavigatorapplication xmlns:fx="http://ns.adobe.com/mxml/2009"                              xmlns:s="library://ns.adobe.com/flex/spark" firstview="views.testconnectionhomeview" applicationdpi="160" creationcomplete="init()"> <fx:script>     <![cdata[         import air.net.urlmonitor;           private var monitor:urlmonitor;          public function init():void{             monitor = new urlmonitor(new urlrequest('http://www.adobe.com'));             monitor.addeventlistener(statusevent.status, announcestatus);             monitor.start();         }          public function announcestatus(e:statusevent):void {             trace("status change. current status: " + monitor.available);         }     ]]> </fx:script> </s:viewnavigatorapplication> 

please see link detecting http connectivity more explanation.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -