offline
macco
19 posts
Nomad
I would like to make a counter to look how many times someone visited my game.
This is my Code:
//Actionscript 3.0
var counter:Number
var myLocalData:SharedObject = SharedObject.getLocal("mygamedata"
myLocalData.data.gameinfo = counter
myLocalData.flush()
if (myLocalData.data.gameinfo != undefined) {
counter += 1
} else {
counter = 1
}
trace("This is your "+myLocalData.data.gameinfo + ". visit."
Now. it always says: "This is your NaN visit."
Why is that? Is there any way to make a counter like that?
macco