Problema Classifica gioco

  • Creatore Discussione Creatore Discussione nuty11
  • Data di inizio Data di inizio

nuty11

Nuovo Utente
5 Gen 2007
2
0
0
allora, io ho creato un gioco in flash con classifica, ora questo gioco l'ho inserito nel mio sito ma nel momento in cui bisogna inserire il proprio punteggio si vede solo nel computer di dove si è giocato e se qualcuno tenta di giocare in un altro computer i punteggi fatti prima nn ci sono, come se si aprisse una classifica nuova.. come posso fare visualizzare un'unica classifica di chi gioca nel mio sito?
 
io ho un database db.php solo che nn riesco a far inserire i punteggi in questo database invio ora i codici della mia classifica flash dove devo inserire questo database (db.php)? che codici sbaglio?

stop();
showScores = function () { var i = 10; while (i > 0){ var n = game_so.data.highScores_array[((page + i) - 1)].name; var s = game_so.data.highScores_array[((page + i) - 1)].score.toString(); var l_mc = this[(("line" + i) + "_mc")]; l_mc.rank_txt.text = (page + i) + "."; l_mc.name_txt.text = n.length ? n.toUpperCase() : "-"; l_mc.score_txt.text = s.length ? s.addCommas() : "-"; l_mc._visible = true; i--; } };
sortScore = function (a, b) { if (a.score < b.score){ return 1; } if (a.score > b.score){ return -1; } else { return 0; } };
page = 0;
maxScore = 100;
if (game_so.data.highScores_array == undefined) {
game_so.data.highScores_array = new Array();
}
if (score > 0 && game_so.data.playerName.length > 0) {
game_so.data.highScores_array.push({score:score, name:game_so.data.playerName});
game_so.data.highScores_array.sort(sortScore);
game_so.data.highScores_array.splice(maxScore);
}
score = 0;
showScores();
last_btn._visible = false;
last_btn.onPress = function() {
page -= 10;
if (page < 0) {
page = 0;
}
if (page < 10) {
last_btn._visible = false;
}
next_btn._visible = true;
showScores();
};
next_btn.onPress = function() {
page += 10;
if (page > maxScore) {
page = maxScore;
}
if (page > (maxScore - 20)) {
next_btn._visible = false;
}
last_btn._visible = true;
showScores();
};
newGame_btn.onRelease = function() {
gotoAndStop(2);
};
ufo_mc.dir = 1;
ufo_mc.onEnterFrame = function() {
if (!this._visible) {
this.dir = int(rnd() * 2) * 2 - 1;
this._x = 250 - this.dir * 300;
this._visible = true;
}
this._x += this.dir * 3;
if (this._x > 550 || this._x < -50) {
this._visible = false;
}
};
 

Discussioni simili