0 Replies Latest reply on Oct 13, 2010 8:46 AM by bigredbeard

    Refreshing a local SharedObject

    bigredbeard

      Hello all, I am building an application that uses a Shared Object that is shared (ironically) between 3 seperate applications. 1 application listens for updates, and the others update the app. The problem I am having is that I need the main application to be able to detect changes to the Shared Object. Unfortunately there seems to be no events to listen for that are not for 'remote objects'. Because of this I created a timer that gets a new local instance of the shared object every X seconds.

      I just call the following before I read or write to the sharedObject:

      private function getNewestSO():void{
          oSO = null; //<-- commenting out makes no difference.
          oSO = SharedObject.getLocal("myDataStore", "/" );  //<-- Causes hiccup
      }

      This is causing a CPU Hiccup every 3 seconds and bogging down the system. so all this being said, does anyone know of a clean way to refresh a copy of the sharedobject without creating a brand new instance of it