Apart from high scores, you can use shared objects to save other user preferences, such as game quality, sound on or off, last level saved, and so on.
Open the file userPrefs.fla to study how the sound controls and game quality can be saved and set on every game start:
function writeData():Void{
mySO.data.qual = qual;
mySO.data.sound = snd;
mySO.flush();
}
function setPrefs():Void{
fscommand2("SetQuality", qual);
if(snd == 1){
_root.sndMC.gotoAndPlay(2);
}
}
In case of game quality or sound, when you select an option, the code first calls the writeData() function. This function simply sets the shared object data properties to values belonging to the application variables.
The code then calls the setPrefs() function, which handles the process of setting the changes to the running application file.