View Full Version : scoreboard help?
maxso5
09-28-2008, 10:17 PM
Hey this is for as2 + 3
Does anyone know the way for a flash games score to be put in mysql. I know there is a way because i read this tutorial. The only problem is that it doesn't talk it through with it and im having troubles getting my game to submit and view scoreboards. Does anyone have there own scripts they would like to share?
This is the tutorial.
http://www.newgrounds.com/bbs/topic/333649
maxso5
09-28-2008, 10:18 PM
Hey this is for as2 + 3
Does anyone know the way for a flash games score to be put in mysql. I know there is a way because i read this tutorial. The only problem is that it doesn't talk it through with it and im having troubles getting my game to submit and view scoreboards. Does anyone have there own scripts they would like to share?
This is the tutorial.
http://www.newgrounds.com/bbs/topic/333649
Eric Schleeper
09-28-2008, 11:09 PM
Two questions:
Do you have the .swf and the .php script on a remote server, its the only way it will work.
Are you using phpmyadmin?
matbury
09-29-2008, 02:32 AM
Hi maxso5,
Yes, to answer your question, it's relatively easy and simple to set up a MySQL hi score table to use with Flash. There are better tutorials that this around. It's a bit daunting at first and you need to be taken through it, step by step to get it right. Find a tutorial that takes you through:
1. Setting up a MySQL database in PHPMyAdmin
2. Setting up a MySQL database table in PHPMyAdmin
3. How to automatically generate SQL queries in PHPMyAdmin (this is great to get you started with SQL!)
4. How to send user and score data to a PHP script from Flash
5. How to catch the sent data with PHP
6. How to open the MySQL database and table
7. How to insert the data and get a confirmation
8. How to send a confirmation to Flash and tell the user that it was successful.
Here's a great video tutorial by Lee Brimelow (Flash guru) to get you started:
http://gotoandlearn.com/play?id=20
Happy coding!
Matt :)
P.S. There's a little detail for when your testing from the Flash IDE. Flash doesn't allow $_POST['']; variables to be sent when you test your SWF. It automatically changes the method to $_GET['']; - Very important to know!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.