View Full Version : Flashpoints, Flashcoins, Whatever...HELP!
REEFˇ
December 9th, 2003, 06:23 PM
How would I make it so that when a button is clicked (in flash), the variable which contains the points are sent to a page using PHP? Just like nickpoints, or stuff like when you play flash games you get points and get to use em for whatever later. THANKS!!!
Marz
December 9th, 2003, 07:26 PM
When a button is clicked?
myButton.onPress = function()
{
myLoadVars = new LoadVars();
myLoadVars.gamePoints = totalPoints;
myLoadVars.send("pointhandler.php");
}
It will either send the variables as GET or POST, depends on what your server is defaulted to.
REEFˇ
December 10th, 2003, 05:59 PM
Sup Marz. Alright lemme clear this up a little :). When I say on click, I don't mean exactly onPress :P. Anyways, I know how to handle the button. What I need is a php code. Thanks.
Jubba
December 10th, 2003, 10:15 PM
What exactly do you want to do with it once its sent to the php page? save it to a text file? manipulate it somehow? insert into a db?
REEFˇ
December 11th, 2003, 05:51 PM
Here's a list of commands I want the code to do:
1. Recieve the name from the flash game. (The variable that holds the name is name)
2. Recieve the points from the flash game. (The variable that holds the points is points)
3. Send these variables to a page with my name on it and my points.
4. If I come back to the page, I still have the same points as last time.
- Thanks. :}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.