Hi,
I've done this flash scoreboard with shared objects.
but what i can done is it will replace the 1st score in my scoreboard, it won't have 2nd, 3rd, 4th and etc...
the script i used is:
Actionscript Code:
submit_btn.onPress = function()
{
//create a new sharedObject called 'userName'
var mySharedObject:SharedObject = SharedObject.getLocal("userName");
var mySharedObject2:SharedObject = SharedObject.getLocal("userScore");
//assign (data) the sharedObject (mySharedObject) a var called 'name1', which has the value of whatever is in textField 'save_txt'
mySharedObject.data.name1 = save_txt.text;
mySharedObject2.data.name2 = save2_txt.text;
//write the data to the sharedObject
mySharedObject.flush();
mySharedObject2.flush();
gotoAndStop(2);
};
Actionscript Code:
//load yoru sharedObject called 'userName'
var mySharedObject:SharedObject = SharedObject.getLocal("userName");
var mySharedObject2:SharedObject = SharedObject.getLocal("userScore");
//grab the variable 'name1' and put the VALUE in a textField called read_txt
read_txt.text = mySharedObject.data.name1;
read2_txt.text = mySharedObject2.data.name2;
I want to have each higher score goes to the scoreboard, so will have 10 highest score in my scoreboard.
here is my attached file in CS5 format.