2 Replies Latest reply on Sep 10, 2008 7:54 AM by corgan1003

    Local Shared Object Unexpectedly Deleted

    corgan1003 Level 1
      Here is the situation:

      I have one swf which is referenced from two html pages (Page 1 and Page 2). Page 1 takes some action that results in the creation of an LSO. I reload Page 1 and it recognizes and reads the LSO.

      Then I reload Page 2 and the LSO disappears. It is actually deleted from the file system. I am pretty stumped on this one because there is only one place in my code where I actually delete the LSO and that is never reached. I even commented that line out and it did not change the results. So there are no LSO.clear() statements in my code but an LSO is getting deleted.

      Any ideas?

      Thanks!
        • 1. Re: Local Shared Object Unexpectedly Deleted
          corgan1003 Level 1
          I made SOME progress on this issue. The LSO actually gets deleted when I close firefox. So Page2.html does not have to be considered. The LSO is simply not persisting.

          Any ideas?

          Thank you!
          • 2. Re: Local Shared Object Unexpectedly Deleted
            corgan1003 Level 1
            Ok so I resolved this issue. I still don't understand why my method before did not work. It seems like a bug in Flash or FF (on OS X). Anyway, here is the issue:

            If you flush an LSO by just using LSO.flush(), you will see the shared object on your file system. But when you quit your browser (FF on OS X), the data will disappear.

            However, if you flush it by doing:
            try{
            LSO.flush();
            if(flushResult == SharedObjectFlushStatus.PENDING)
            LSO.addEventListener(NetStatusEvent.NET_STATUS, onStatus);
            }catch(...){
            ...
            }

            private function onStatus(event:NetStatusEvent):void{
            if(event.info.code == "SharedObject.Flush.Success"){
            ...
            }else if(event.info.code == "SharedObject.Flush.Failed"){
            ...
            }
            event.target.removeEventListener(NetStatusEvent.NET_STATUS, onStatus);
            }

            This works! ...still think just calling the flush method should work though
            }