People are losting gave save (locked)

3 posts

Flag Post

I’m not quite sure but I’m pretty sure ISO.getLocal() should only be called in the variable definition.
That could be totally wrong what I just said there, so please someone correct me if I’m wrong.

But here’s the way I save stuff in my games, the save system you’re using seems to be filled with a lot of useless stuff:

var SO:SharedObject = SharedObject.getLocal(“game_name”);

function saveGame() { = player.x; = player.y;

function loadGame() {
player.x =;
player.y =;

You could change out the number values with whatever you wanted (booleans, strings, etc).
Hope this helped!

EDIT: Added in .data’s, sorry, typo. (tested and it works now)

Flag Post

The code posted in that thread is correct, but lacks the variable definition of myLSO (something that is allowed in AS2 but not in AS3), and is overly complicated. You should try to reproduce the problem.

@Glutenfree4u: You must save the variables in the data property of the sharedobject, not as properties of the sharedobject itself. Your code won’t work.

Flag Post

Just trying to cover all bases, but do they have their flash storage set to unlimited? If not, newer saves from other games on that site will overwrite older ones. Also, right after the last line in the saveGame function: = myObj;, you’ll want to add myLSO.flush(); to force everything to be written. If you don’t, you’re at the mercy of flash to flush() at its discretion, which may not happen under various circumstances. (such as if flash crashes)