2 Replies Latest reply on Jan 11, 2007 9:09 AM by kglad

    SharedObject broken?

    abeall Level 3
      var so = SharedObject.getLocal('onj');
      so.data.blah = "hi";

      Should that produce "undefined" & "hi" the first time, and "hi" & "hi" the second time? For some reason I can't get any SharedObject to save data. Using Flash 8, publishing to Flash 6/7/8, AS1/2
        • 1. Re: SharedObject broken?
          abeall Level 3
          Here was my problem: I was out of Flash local storage space. I'm not sure how I was out of space with the example above, except that maybe local counts as a single domain, so all storages from all local SWFs eat away at the default 100KB limit.

          I don't usually flush(), because Flash will automatically flush when the session is closed. However, if I had been flushing, I would have found the problem earlier. One important thing(the only important thing as far as I can tell) that flush() does is make a request for the needed storage space, and if there's not enough permitted storage left, it prompts the user for more. Without flushing, it successfully saves the data on the SharedObject instance, but silently fails to flush it when the session is closed; upon return, the data is not there to be loaded. Lesson learned: I need to get in the habit of using flush() for important local data!
          • 2. Re: SharedObject broken?
            kglad Adobe Community Professional & MVP
            good info.