5 Replies Latest reply on Jun 20, 2007 1:52 PM by fbriggs

    Can we detect errors in SharedObject.flush when a SWF closes?

    fbriggs
      Hello,

      I am working on a program that uses SharedObjects to store data locally. There are no explicit calls to SharedObject.flush- instead we rely on it being called automatically when the SWF closes. However, there are some actions that the user could perform that cause the amount of data in the SharedObjects to exceed the 100k default limit. If we were explicitly calling SharedObject.flush, it would be possible to determine if the flush succeeded or not. However, since we are not calling it explicitly, we are left with a challenge: how do we respond if it fails?

      A little bit of testing shows that if the amount of data in the SharedObject exceeds the limit when the SWF closes, the data is simply not written. It would be unfortunate if we had to call flush every time the ShareObject's data changes, because it changes very frequently.

      Thank you for your suggestions.