Posted By

GrfxGuru on 01/31/11


Tagged

actionscript detection network AIR


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

kure69
thastyle


Adobe AIR - Detecting network connectivity


 / Published in: ActionScript 3
 

  1. private var monitor:URLMonitor;
  2.  
  3. // This is just an example of a function called after application creation complete
  4. private function handle_creationComplete():void
  5. {
  6. monitor = new URLMonitor( new URLRequest("http://www.someaddress to check against") );
  7. monitor.addEventListener( StatusEvent.STATUS, handle_status );
  8. monitor.start();
  9. }
  10.  
  11. private function handle_status ( event:StatusEvent ):void
  12. {
  13. trace(monitor.available);
  14. }

Report this snippet  

You need to login to post a comment.