views:

17

answers:

1

Is it possible to store instances of a class in a cookie or in shared objects.

Basically in my application I have an object "Diagram" that the user can create. If they hit save, I want to store the current instance as a cookie and allows them to reload it later.

Alternatively, I could see about getting them to store the saved version on the hard disk. But even then, all I want to save and retreive is my actionscript object.

Is this possible?

I've tried storing the object to SharedObject.data.diag, but when I try to retrieve the object from the cookie doing SharedObject.data.diag as Diag returns null.

A: 

http://www.oreilly.de/catalog/9780596529857/chapter/ch17.pdf

Page 10: Serialize typed objects.

You may have issues with deep cloning if you have a complex class.