guille.soft
05-17-2006, 03:13 PM
Hi,
I have already sent a post earlier about that problem and I thought that I had the solution but it seems that I can't make it work :
I am trying to send data from Flash to a php page to update the database (it is for a game and I want to update the score table). I am able to do it BUT it reloads the PHP page and therefore the Flash Movie is restarted... which I don't want to.
Here is how it works ( I put a small graphic attached to the post to be clearer) : There is one PHP page called : eatBones.php The game eatBones.swf is embedded inside the eatBones.php page. When the user wants to submit his score it sends it to eatBones.php which do what it has to do to update or not the score table in the dataBase.
So it works fine.... but it reloads the entire page which is really annoying, and I can't figure out how to make it work without reloading. I tried to send the score to a different php page called highscore.php but then it opens the highscore page in the browser which I obviously don't want...
Here is the code I use in the Flash movie to send the data :
var dataOut:LoadVars = new LoadVars();
dataOut.Score=_root.scoreWithBonus;
dataOut.User=_root.user;
dataOut.send("eatBones.php", "POST");
Sorry for the long post!! :cool:
Thanks in advance :) :)
I have already sent a post earlier about that problem and I thought that I had the solution but it seems that I can't make it work :
I am trying to send data from Flash to a php page to update the database (it is for a game and I want to update the score table). I am able to do it BUT it reloads the PHP page and therefore the Flash Movie is restarted... which I don't want to.
Here is how it works ( I put a small graphic attached to the post to be clearer) : There is one PHP page called : eatBones.php The game eatBones.swf is embedded inside the eatBones.php page. When the user wants to submit his score it sends it to eatBones.php which do what it has to do to update or not the score table in the dataBase.
So it works fine.... but it reloads the entire page which is really annoying, and I can't figure out how to make it work without reloading. I tried to send the score to a different php page called highscore.php but then it opens the highscore page in the browser which I obviously don't want...
Here is the code I use in the Flash movie to send the data :
var dataOut:LoadVars = new LoadVars();
dataOut.Score=_root.scoreWithBonus;
dataOut.User=_root.user;
dataOut.send("eatBones.php", "POST");
Sorry for the long post!! :cool:
Thanks in advance :) :)