I now mostly post over here: blog.greer-inc.com

I'm a Digital Designer, Art Director and Developer. I'm into photography, interactive design, the web, advertising and art.

AS3 SharedObject

Posted: May 19th, 2010 | Author: | Filed under: General | Comments Off

Looking 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.

Comments are closed.