Central Scoreboard with Flash and ASP
Contributed by Chris Worfolk {Page 1 of 4 )
Adding a few flash games to your site is always a great way to get visitors to stay on your site a bit longer and even keep them coming back. It’s well known that one of the best ways to keep visitors coming back is interactivity. So why not let your visitors battle it out between each other?Why use a scoreboard? The problem with games by themselves is that they are limited in their interactivity; once you have competed a game, it is done there is nothing more to do. However it adds a whole new level if you get players competing against each other, trying to reach the top score. Or if someone does you can always add a few fake players to keep them going. The problem with having a scoreboard is that it has to be dynamic. If you have the flash game on several different servers or in several different locations it’s impossible to upload new results every time they change and updating them manually would leave a large delay between the player achieving the score and it being added to the board. What you need In this example I am going to use a Microsoft Access database, although as long as you can work out the connection scripts any database will do. The flash movie itself does not have to interact with the script, only the ASP scripts do. The files we will be using: - Database.mdb
This is the database where the scores will be kept
- Game.swf
This is the flash movie the users will battle it out on
- Scoreboard.asp
This will send the results to the flash game
- Addscore.asp
This will add a player’s result to the database
|