0 Replies Latest reply on Jun 7, 2011 1:12 AM by Lasnerdj

    Getting memory read and write issue, when application is offline

    Lasnerdj

      Hi,

      I am using socketmonitor for detecting my air application online or offline.

      Below my code:-

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">

      <mx:Script>

      <![CDATA[

      import air.net.ServiceMonitor;

      import air.net.SocketMonitor;

       

      import flash.events.StatusEvent;

      public var socketMonitor1:SocketMonitor;

      public function init():void

      {

      socketMonitor1 = new SocketMonitor('10.6.124.222',8080);

      socketMonitor1.addEventListener(StatusEvent.STATUS, socketStatusChange);

      socketMonitor1.pollInterval=500;

      socketMonitor1.start();

      }

       

      function socketStatusChange(e:StatusEvent):void {

      trace("Status change. Current status: " + socketMonitor1.available);

      l1.text=(socketMonitor1.available).toString();

      }

      ]]>

      </mx:Script>

      <mx:Label id="l1"/>

      </mx:WindowedApplication>

       

      its working fine when i am online but whenever i goes offline i am getting error message like "The instruction at "0xba468c55" reference memory at "0xba468c55". The memory could not be read".

      Any one know what i did wrong or any solution?

       

      Thanks

      Lasnerdj