saveSharedObject

var saveDataObject:SharedObject;
saveDataObject = SharedObject.getLocal("test");
of
in 1en
saveDataObject:SharedObject = SharedObject.getLocal("test");

saveDataObject.data.savedScore = currentScore;

When you want the SharedObject to actually, immediately write its save data to its file on the player’s local hard drive you flush it:

saveDataObject.flush();

This is a very processor intensive action to call, so use it sparingly (never include it an a loop function).

To load “currentScore” from the “savedScore”, we would write:

currentScore = saveDataObject.data.savedScore;