Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. //gets LSO object / creates if it doesn't exist
  2. var mySharedObject:SharedObject = SharedObject.getLocal("app3");
  3.  
  4. //output string from LSO to a text field
  5. viewer.text = mySharedObject.data.viewer;
  6.  
  7. //when button clicked, get textfields current text and save it in LSO
  8. lso_save.addEventListener(MouseEvent.CLICK, saveLso);
  9.  
  10. function saveLso(e:Event):void
  11. {
  12. mySharedObject.data.viewer = viewer.text;
  13. mySharedObject.flush();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement