views:

205

answers:

1

I have a project where the client can save data from a flex app to their client in xml , something like

<xml>
<project id='1111'>
<data ... />
<data ... />
</project>
</xml>

this is stored on the flex sharedlocalobject , but if the client creates a new project it overwrites the existing project. How can i store multiple projects in the sharedlocalobject?

+1  A: 

The data attribute of a shared object can store arbitrary number of values like this:

var so:SharedObject = SharedObject.getLocal("sharedObject");
so.data.one = 1;
so.data.two = 2;
...

So in your case, you could simply store each project XML in a separate "attribute" of the data object.

David Hanak
wow that looks like exactly what i was looking for .... thanks for your help!
Rick J