I need help i followed the the tut but it doesn't work the output says the code is ok so i must have put everything in the right place here is the code
Timeline load code:
//Specify the save file to use
var savefile = SharedObject.getLocal("Counter");
//Grab the level and score held in the file, and assign them to variables
_root.hrs = savefile.data.hrs;
_root.min = savefile.data.min;
_root.sec = savefile.data.sec;
//If they don't exist, (ie first run), set variables to zero
if(savefile.data.score==undefined){
_root.hrse=0;
_root.min=0;
_root.sec=0;
}
Load button:
on (press){
var savefile = SharedObject.getLocal("Counter");
if(savefile.data.score==undefined){
_root.hrs=0;
_root.min=0;
_root.sec=0;
}else{
_root.score=savefile.data.score;
}
}
Save button:
on (press){
savefile.data.score = _root.hrs;
savefile.data.score=_root.min;
savefile.data.score=_root.sec;
savefile.flush();
}
Please help?
Note: The timeline code is on layer 2 and the save and load layer 1. all in 1 frame.