Kod z PHP
<?php $winscore = (int)$winscore= $_GET['winscore'];; // Create a Blank File if it doesn't already exist { } // Read the file in // Break out the data into a new 2-d array called $tscores for ($i = 0; $i < $numreadin; $i++) { $tscores[$i][0] = $g[0]; $tscores[$i][1] = $g[1]; } // Fill in any missing data with none/0 for ($i = $numreadin; $i < $scoresize; $i++) { $tscores[$i][0] = 0; $tscores[$i][1] = "none"; } // Process the actions // Insert a score/name if ($action == "INSERT") { // Add name to end of list, and sort $tscores[$scoresize + 1][0] = $winscore; $tscores[$scoresize + 1][1] = $winname; // Write them out for ($i = 0; $i < $scoresize; $i++) { } } // Clear the list if ($action == "CLEAR") { $k[0] = 0; $k[1] = "none";
[/php]
kod w Actionscript:
_root.scoretable.filename = "scores/demo.sco";
_root.scoretable.scoresize = 10;
_root.scoretable.action = "INSERT";
_root.scoretable.viewtype = "FLASH";
_root.scoretable.winname = name;
_root.scoretable.winscore = score;
_root.scoretable.loadVariables("http://www.myscore.com/scores.php", "GET");
źródło:
http://www.flashkit.com/tutorials/Games/High-sco-Glen_Rho-657/index.php