Posted By

chrisaiv on 11/26/07


Tagged

AIR


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

copyleft
THEPWN3R
dx0ne


Basic Construct for an Occasional Connectivity


 / Published in: ActionScript 3
 

  1. //Basic Construct for an Occasional Connect
  2.  
  3. var url = 'http://www.adobe.com';
  4. var monitor = null;
  5.  
  6. monitor = new runtime.air.net.URLMonitor( new air.URLRequest( url ) );
  7. monitor.addEventListener( air.StatusEvent.STATUS, doNetworkStatus );
  8. monitor.start();
  9.  
  10. function doNetworkStatus( e ){
  11. if( monitor.available ){
  12. //do something
  13. }
  14. }

Report this snippet  

You need to login to post a comment.