views:

44

answers:

3

Hey there, i was wondering what the AS3 experts would do to perform this task: save user data (registry form) locally, and then be able to read it or export it into something client can read.

Thanks in advance, i am quite new to the AS3 approach to this things, thing to notice is this project is pure AS3, and deployed in Adobe AIR, so no server programming.

A: 

Depending on the size of your data, you could use a SharedObject to save your data locally.

As for something the client can read , can you be more specific?

PatrickS
+2  A: 

If you have access to AIR features, you can save large amounts of data in a file:

var storage:File = File.applicationStorageDirectory.resolvePath("data.xml");
var stream:FileStream = new FileStream();
stream.open(storage, FileMode.WRITE);
stream.writeSomething //there are various .writeXXX functions
stream.close();

I would save xml file (just to avoid inventing custom parser), then read it back.

alxx
+2  A: 

you can save data in SharedObject to make it readable from flash. if you need to export it to a user defined location you can use FileReference.save() method, but to read it back the user must enter the path to file manually

www0z0k