Posted By

allnatural on 03/17/09


Tagged

cookie local SharedObject


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

damarev
thastyle
quan


Basic Local SharedObject


 / Published in: ActionScript 3
 

This is just a basic SharedObject snip, access/store data locally.

  1. import flash.net.SharedObject;
  2.  
  3. var so:SharedObject = SharedObject.getLocal("userData");
  4.  
  5. so.data.username= "user1377";
  6. so.data.uid= new Number(1337);
  7.  
  8. // create object to store data
  9. var obj:Object = new Object();
  10. obj.prop = "value";
  11.  
  12. so.data.userobj= obj; // store custom object in SharedObject
  13.  
  14. so.flush(); // writes changes to disk

Report this snippet  

You need to login to post a comment.