Skip to main content
March 17, 2012
Question

SharedObject question (I think)

  • March 17, 2012
  • 1 reply
  • 401 views

Is my code :

private var so:SharedObject = null;

  

   private function saveFile():void

   {

    try{

     so = SharedObject.getLocal("domain", "/");

    }

    catch (e:Error)

    {

        return;

    }

    so.data.main = _byteArray;

  

     var flushResult:String = so.flush( 10240 * 1024); //

     if (flushResult == SharedObjectFlushStatus.PENDING)

     {

      so.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);

     }

     else if (flushResult == SharedObjectFlushStatus.FLUSHED)

     {

     }              

   }

After running the flash player,

I saw the C: \ Users \ * \ AppData \ Roaming \ the Macromedia \ Flash Player \ # SharedObjects \ 4QUP95TY \ # the localhost file domain.sol and can get to the value of the object.

But when I turn off the flash player, the file is automatically deleted.

I use the " var flushResult:String = so.flush( 10240 * 1024)".

Why back in the flash player is turned off automatically deleted

How to deal with can be permanently stored in the local, rather than close the flash player is automatically deleted after

This topic has been closed for replies.

1 reply

_spoboyle
Inspiring
March 19, 2012

I have created a project from your code and it all works fine for me

the issue is not with this code