user3242368
user3242368

Reputation: 1

Client-side database in Actionscript 3 (built into the client, not read from a server database)

I'm looking to create a way to store items for a game I'm making using Flash. There's going to be many items in the game and I want to store them in a database that is built into the client and doesn't require connecting to the server.

I know I could write a parser and import a spreadsheet file into my game, but I'd like to not reinvent the wheel if I don't have to.

Is there a way or library that's already created for reading from a client side database? I guess I'm looking for some way to use a database style system on the client side without having to build everything from the ground up.

Upvotes: 0

Views: 50

Answers (1)

Marty
Marty

Reputation: 39456

Look at SharedObjects:

var saveData:SharedObject = SharedObject.getLocal("GameName");
saveData.data.test = 5;
saveData.flush();

// ... Restart the application and then:
trace(saveData.data.test); // 5

Upvotes: 1

Related Questions