Languages

Fsharp
ActionScript
xBase
Clean
GPSS
PureBasic
Sieve
Erlang
JOVIAL
Mercury
Linda
DataFlex
PostScript
FoxPro2
VFP
Cobol
Prolog
Jython
Awk
VisualBasic
JavaScript
Matlab
ASP
Haskell
Csharp
D
Smalltalk
Nemerle
Pixilang
Java
SQL
Python
ObjectPascal
Ruby
Perl
Pascal
Assembler
PHP
C
Functions  Add function  Users  Registration  Enter   About  ASCII Table  Our helpers

ASP


1 Central Scoreboard with Flash and ASP

2 The database

3 Adding player’s scores

4 The Flash file

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


1 2 3 4
"Stocky Dragon" Dinosaur Terrorized Late Cretaceous Europe

Photo of the fossilized hindlimb of Balaur bondoc.

Paleontologists have discovered that a close relative of Velociraptor hunted the dwarfed inhabitants of Late Cretaceous Europe, an island landscape largely isolated from nearby continents.

While island animals tend to be smaller and more primitive than their continental cousins, the theropod Balaur bondoc was as large as its relatives on other parts of the globe, and demonstrated advanced adaptations including fused bones and two terrifyingly large claws on each hind ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117592&WT.mc_id=USNSF_51&WT.mc_ev=click


This is an NSF News item.

PycckaR
BepcuR


Articles
Articles


Library
Library


Downloads
Downloads

Google Chrome Golf 6
 © Internet, books, teachers and Rudevich Alexander brains.