PDA

View Full Version : Flash Database PHP


guille.soft
04-21-2006, 08:22 PM
Hi,

I am building a game in Flash and I am having a little of trouble with the Highscore table. I am able to send and get information from the database fine but when I send a score it reloads the php page and therefore the swf goes back to the begining.
I would like to be able to send the data to the database without having to reload the page. Is that possible?

Right now I am using this following code to send the variables to the PHP file :

var dataOut:LoadVars = new LoadVars();
dataOut.send("eat_bones.php","_self", "POST");

Thank you very much for your help !!

Guille Soft

Cota
04-21-2006, 08:34 PM
loadvars doesnt reload the page, unless the file you're using to loadvars is the same file the Flash file is nested it. In your case, you have set the outgoing variables as well..

var dataOut:LoadVars = new LoadVars();
dataOut.Var1 = "Something";
dataOut.var2 = "somethingelse";
dataOut.send("eat_bones.php","_self", "POST");

follow me?

guille.soft
04-21-2006, 10:15 PM
Alright, I understand. I am going to try that as soon as possible. Thank you very much !! :)