A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: SharedObject data after windows shutdown?

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    37

    SharedObject data after windows shutdown?

    will sharedobject data be gone after windows shutdown?

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    It should persist. It's written to a file on the hard drive, very similar to a cookie.

  3. #3
    Member
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    36

    Exclamation Use flush ()

    Hi zerlphr,

    You need to use flush (), in order to write on the hard drive
    For more information go to http://livedocs.adobe.com/flash/9.0/...t.html#flush()

    Code:
    var SharedData:SharedObject = SharedObject.getLocal("hostName");
    
    // Save Data
    SharedData.data.username = "User Name";
    SharedData.flush ();
    
    // Get Data
    var username:String = SharedData.data.username;
    
    // Delete Data
    SharedData.clear ();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center