Return to Snippet

Revision: 22796
at January 22, 2010 13:30 by allnatural


Initial Code
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="absolute"
  creationComplete="init();">
  <mx:Script>
    <![CDATA[
      import air.net.ServiceMonitor;
      import air.net.URLMonitor;

      private function init() : void
      {
        var urlMonitor : URLMonitor;
        var urlRequest : URLRequest = new URLRequest( "http://seantheflexguy.com" );
        urlMonitor = new URLMonitor( urlRequest );
        urlMonitor.addEventListener( StatusEvent.STATUS, onStatusEvent );
        urlMonitor.start();
      }
      private function onStatusEvent( event : StatusEvent ) : void
      {
        var evt : StatusEvent = event;
        trace( ">>onStatusEvent::evt.code=" + evt.code );
      }
    ]]>
  </mx:Script>
</mx:WindowedApplication>

Initial URL
http://www.destroyyourcomputer.com

Initial Description

                                

Initial Title
Adobe AIR URLMonitor Example

Initial Tags

                                

Initial Language
ActionScript 3