AS3 SharedObject
Posted: May 19th, 2010 | Author: admin | Filed under: General | Comments OffLooking into whether the flash player can set and retrieve cookies, I stumbled upon the ‘SharedObject’ – it’s like a cookie, but the flash player stores the information locally (and not in with the browser cookies). If you’re looking to set real cookies, try here. The shared object seems handy for a lot of things though, and it’s really simple to use:
I put together a test to see how it worked:
Enter text, click set, then refresh the page. The content set into the shared object will persist. Which could be handy for a bunch of things, no? Seems like storing the current state of a web app is a must in case the user accidently closes the tab or navigates away.
Source files for the example here: sharedObject.