Basic Local SharedObject


/ Published in: ActionScript 3
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.