|
-
Amiga freak
Instructions added.
 Originally Posted by Archbob
Hi, what function in flash are you using to post your scores to the php script?
I generally use:
Code:
loadVariablesNum("urlofscorepostingscript",0, "POST");
And then the following score posting script;
Code:
<?php
$db = mysql_connect("localhost", "username", "password") or die("Could not connect.");
........
I use the one on EgoAnt's page..., so I use:
sendScore.sendAndLoad("addScore.php", score_result, "POST")
and
loadVariables("getScores.php", "startGameClip");
using this code in Flash:
Code:
function sendScores(userName:String, userScore:Number) {
var sendScore:LoadVars = new LoadVars();
sendScore.userName = userName;
sendScore.myScore = userScore;
var score_result:LoadVars = new LoadVars();
score_result.onLoad = function(success:Boolean) {
submitScoreClip._visible = false;
startGameClip._visible = true;
setScore(0, 0);
setLife(0, 100);
if (success && this.scoreIn == "1") {
systemText.text = "Score sent!";
} else {
systemText.text = "Error sending score to server.";
trace(this.scoreError);
}
};
and stuff. and some php scripts...
do, what should I do to make it work on a server with register_globals OFF in the PHP.ini??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|