High Scores Board AS2

Hello everyone,
I know this is a subject that gets covered a lot as i have found a ton of tutorials that show a million dfferent ways to create a high scores board on a flash game.  So i decided to go out on a limb and pick a tutorial out to try.  Well I have now tried 3 different ones and have yet to get a working high scores board with my game.
http://www.flashkit.com/tutorials/Games/How_to_c-Nick_Kuh-771/index.ph p
That is the link to the most recent attempts to creat my high scores board.  When i finished everything the way the tutorial said it seemed like everything would work and then it just didnt.  After spending oh about 40 plus hours trying to make a high scores board i am getting very frustrated.  My game is scripted in AS2 and i have access to mysql and can set up unlimited databases.
Can anyone please help me by sending an easy to follow tutorial that will work with AS2?  I would just like any kind of help right now as I feel ALL of my valid ideas have been ehausted.  Thanks in advance to anyone that can help!
kapelskic

Please don't cross post in these forums

Similar Messages

  • Flash Game High Scores Board

    Hello everyone,
    I know this is a subject that gets covered a lot as i have found a ton of tutorials that show a million dfferent ways to create a high scores board on a flash game.  So i decided to go out on a limb and pick a tutorial out to try.  Well I have now tried 3 different ones and have yet to get a working high scores board with my game.
    http://www.flashkit.com/tutorials/Games/How_to_c-Nick_Kuh-771/index.php
    That is the link to the most recent attempts to creat my high scores board.  When i finished everything the way the tutorial said it seemed like everything would work and then it just didnt.  After spending oh about 40 plus hours trying to make a high scores board i am getting very frustrated.  My game is scripted in AS2 and i have access to mysql and can set up unlimited databases.
    Can anyone please help me by sending an easy to follow tutorial that will work with AS2?  I would just like any kind of help right now as I feel ALL of my valid ideas have been ehausted.  Thanks in advance to anyone that can help!
    kapelskic

    Okay not a problem.
    This is my code on the very first frame of the game that initializes the the highscores.php script
    command = "init";
    _root.loadVariables("highscores.php?"+int(Math.random()*100000), "POST");
    This is the code that I have on a submit button, next to the input text box where the user enters their name for the scoreboard.
    on (release) {
    if(name ne ""){
    command = "update";
    _root.loadVariables("highscores.php?"+int(Math.random()*100000), "POST");
    gotoAndStop ("highScores");
    In every place the code says _root. I have also tried this. and neither of them work.  I have also tried a million other things.  So far the game plays through, goes to the game over screen where it asks for a user name and tells them their score.  Then once they press submit the game goes to the highScores screen but the name and score are not there.  The high scores screen cosists of 2 dynamic text fields one named "players" and one named "scores".  I hope this helps because I spent another 5 or so hours after my initial posts trying more tutorials with still no luck.  (the problem i am having is that i am new to flash, however not to PHP)
    kapelskic

  • Score board for a game show

    Hi all, Ok here goes.
    I need to create a score board for a game show at work for staff.  The score board must keep score on the left and right parts of the screen. score must start as default on 0.  Then every time I press for example the left arrow key the left score must increase by the value of 1 and when I press the right arrow key the left score must decrease by 1.
    Same goes for the right score only with differant keys example up and down keys.  This sounds very simple and I managed to get it to work when I tested with only 1 score, but failed when adding the second score to the picture.
    Please help me out on this as I don't know how to program in flash and I'm not getting any replies from other forums.

    That is AS2 code so you should repost your problem in the AS1/2 forum if you continue to have a problem.  You should try making the other score work again and show the code you are using that is not working.
    Since you have little familiarity with coding, you will do best to not approach coding the way you are.  Putting code "on()" objects is not a good practice.  You should place all the code in the timeline and assign instance names to objects to enable the timeline code to target the objects.
    If you have a button in place merely to support having the code for keyboard interaction processing, then you should do away with that and just have code assigned to deal with the keyboard specifically.  Here's some code that might get you started... if you cannot get it working for you, then please repost your problem in the correct forum.  The code goes in the timeline. Instead of the traces, you would be changing the score values...
    var keyListener:Object = new Object();
    Key.addListener(keyListener);
    keyListener.onKeyDown = function(){
       if(Key.getCode() == 38) trace("up");
       if(Key.getCode() == 40) trace("down");
       if(Key.getCode() == 37) trace("left");
       if(Key.getCode() == 39) trace("right");

  • High score functionality via call to external server

    I have just packaged an existing Flash game as a test and literally just packaged it without making any changes whatsoever. The game included a top 100 score board which is populated by calling an asp page on an external server that returns xml data.
    I was most surprised that the high score functionality all worked when I tested the game on my iPhone i.e it displays the scores. I haven't tested submitting one yet though.
    I therefore wondered if this is allowed and if so is there any reason why this should be avoided. I have read there is something called Open Feint that allows you to do high scores.
    Any advice much appreciated.
    Thanks
    Paul

    Hi,
    where exactly is the FM crashing and why? Did you debug? Is it occuring at
    CALL FUNCTION 'FTP_CONNECT' DESTINATION RFC_DESTINATION
         EXPORTING USER = USER PWD = PASSWORD ACCT = ACCOUNT HOST = HOST
                   TRACE = FTP_TRACE GUSER = GATEWAY_USER
                   GPWD = GATEWAY_PASSWORD GHOST = GATEWAY_HOST
         IMPORTING HANDLE = HANDLE ERROR = CERROR
         EXCEPTIONS SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2.
    or earlier?
    Try tracing with ST01, one time with the way it works, and another time out of the WebDynpro where it crashes, then compare the logs.
    regards, Lukas

  • How to manage high score file

    Hello,
    I have made i little game in CVI, in the end of the game user get a score base on the levels he passed and the level of difficulty.
    As this is a school assignment i have to have a score board. I've made score board using a table and i read arguments from a txt file.
    All I read is the name of the player and his score.
    The trouble that I'm having is to check the txt file and see if the new score of the user can be put in the score board.
    I need to known how I check if user's new score need to be put into the score txt file, and how to put it there.
    Thanks in advacne!

    Hello Slavik87!
    If I understand your question correctly, want to are asking is how to read the text file, retrieve the highest scores from it and update the file again.
    If you are asking about which functions to use, these are some functions you can use to perform the file operations:
    fopen, to open the file
    fputs, to write a string to the file
    fgets, to get a string from the file
    fseek, to navigate through the file
    fclose, to close the file
    Here are some suggestions about how you can manage the information in your text file:
    Insert each new entry (name, score) on a separate new row, optionally using separators:
    John Doe, 10
    Kelly Smith, 43
    Kevin Brown, 4
    After reading these lines from disk, you would have to store the entries in some data structures (e.g. lists, structures) for your application to manage.
    For optimization, you can also sort the rows based on the highest score, this way, when you want to retrieve the highest scores, these are already situated at the beginning of the file. However, when you update the rows, you would have to switch places of rows, when a person will have a higher score than the previous item(s).
    Best regards!
    - Johannes

  • Keynote score board with feeds?

    Hey everyone,
    im working on a project where im going to project a keynote presentation that includes a few things to make a score board. Basicly i want it to have live feed from my webcam, a timer that counts down and 2 small boxes to keep the score for that team.
    Now i have finaly managed to get live feed from my camera using quartz composer. Now for the count down i have no idea, but that is the least of my problems. I need to be able to upadate a table with the scors for each team without taking the presentation down. So i was thinking, if i make an rss feed of an exel table, (Whitch i can do no problem) i could rss feed it into the keynot... but i tryed quarts composer and it doesnt work, any ideas on how i can get it to work, or how i can do it another way?
    What about the countdown timmer? any ideas for that? (maybe just a video counting down, that may be ok)
    But yeah the score is what is realy buzzing me...
    Please help
    Thanks
    Gui

    That is AS2 code so you should repost your problem in the AS1/2 forum if you continue to have a problem.  You should try making the other score work again and show the code you are using that is not working.
    Since you have little familiarity with coding, you will do best to not approach coding the way you are.  Putting code "on()" objects is not a good practice.  You should place all the code in the timeline and assign instance names to objects to enable the timeline code to target the objects.
    If you have a button in place merely to support having the code for keyboard interaction processing, then you should do away with that and just have code assigned to deal with the keyboard specifically.  Here's some code that might get you started... if you cannot get it working for you, then please repost your problem in the correct forum.  The code goes in the timeline. Instead of the traces, you would be changing the score values...
    var keyListener:Object = new Object();
    Key.addListener(keyListener);
    keyListener.onKeyDown = function(){
       if(Key.getCode() == 38) trace("up");
       if(Key.getCode() == 40) trace("down");
       if(Key.getCode() == 37) trace("left");
       if(Key.getCode() == 39) trace("right");

  • Game app high scores

    Morning all.
    I have a game app called Blitz.  (It is a version of Bejewelled.)  Every week, my high score sets reset to zero.  Fair enough ... except no-one else's does.  The same other high scores are there week after week, month after month.  Now, I think it unlikely that on every reset Splork gets exactly 365,050 again and Wall-nut gets exactly 151,350, etc, etc, so I can only assume they are not being reset.
    And my question is ... why would this be?  I am mystified.

    I'm not near the top score, so I can't think they think I'm cheating.
    I am connected up properly.  My scores get recorded fine.  Then, once a week, it says "time for a new high score" or something similar and the next game I play gets shown as my highest.  Then, through the week, I improve on this (or not, depending), and then it all happens again.  But everyone else's scores just stay there.
    The only explanation I can think of is that none of the others on the leader board have played again since recording their last score.  Maybe as soon as they do, their old score will go. 

  • I bought a new Iphone 4s and when I sync my apps over I lost all of my high scores. How can I get back my high scores as I do not want to start all over on some of the games

    I bought the new Iphone 4s. I backed up my old 3gs on Itunes store before trading in my old Iphone. I sync my new phone and I have all of my apps but non of the high scores. For example I played all of the angry birds and had three stars on all levels. Now I have the app on my Iphone but I am back no levels completed. How do I fix this problem. My Itunes store is on a PC running Windows 7

    Under the answer you want to mark as correct you should see a box that says Correct with a green symbol to the left and a box with Helpful with an orange star to the left. Click on the one you want.
    And thanks for thinking about that, it is appreciated.

  • How can you get back a lost high score after a partial sync?

    I was playing a Temple Run game, which I was currently getting a high score on, when I plugged it into my computer to charge. Since it was the first time I had plugged it in, the Mac asked me to do some stuff. After my iPod started to sync, everything was fine. I then had to leave, so I ejected it and left. It kept syncing until I was out of the wi-fi range and down the road. I go into Temple Run, and find my game I was playing gone. The coins weren't added, and the high score wasn't even updated. When I came home, I tried syncing it again, and the info still didn't come back. Is is possible to regain the data back? I just really want the 7 million high score back...

    Try restoring from backup.  If yu did not backup since you messed up, restoring from backup should get you back to when the backup was made. Got to iTunes>Preferences>Devices and check the box that says "Prevent iPod...syncing" otherwise when you connect, a backup will be made that does not contain the info you want.

  • Score board

    Hello gurus,
    what is score board and how do we create it?
    Priya

    Scoreboard is the generic phrase; scorecard is the technical phrase.
    This is "THE" word in performance measurment / evaluation.
    Organizations will plan for 3-5 years and decide where it wants to be in terms of sales, profit, customer sartisfaction, etc. They give a target values for such parameters. As the time proigresses, the actuals will be measured aganist the standards and the resut will be displayed in the scorecard in the form of scores.
    Ravi Thothadri

  • Keeping a high score

    I'm not sure whether to put this topic here or on the game section, so forgive me if it's not supposed to be here. Just like the title says, I'd like to keep simply one high score. I'd like to write it into a file (along with the name of the person who holds the high score). I simply do not know what to do, I will post what I have so far (it's just a piece of a bigger class):
    public void openFile(){
              BufferedReader file;
              try
                   file = new BufferedReader (new FileReader ("data.dat"));
              catch (FileNotFoundException e)
                   System.out.println("File not found.");
              try
                   int highCombo = file.read();
                   if(MovingBar.p1Hits > highCombo && MovingBar.p1Hits > MovingBar.p2Hits){
                        JOptionPane.showMessageDialog(null, "Congratulations! Player 1 has beat the high score of " + highCombo + " hits with " + MovingBar.p1Hits + " hits!", "Congratulations!", JOptionPane.PLAIN_MESSAGE);
                        String name = JOptionPane.showInputDialog("Enter your name:");
                   if(MovingBar.p2Hits > highCombo && MovingBar.p2Hits > MovingBar.p1Hits){
                        JOptionPane.showMessageDialog(null, "Congratulations! Player 2 has beat the high score of " + highCombo + " hits with " + MovingBar.p2Hits + " hits!", "Congratulations!", JOptionPane.PLAIN_MESSAGE);
                        String name = JOptionPane.showInputDialog("Enter your name:");
         }I know there are a lot of random pieces of info, but more importantly, MovingBar.p#Hits is a variable in another class which I want to keep as a high score if it is one. highCombo is the current high score (hopefully read from the file data.dat which is simply a text file). I pretty much scrounged this code up from random places so I really dunno exactly what I'm doing. Also, I realize that I'm missing something from the last "try" statement and I don't know what to put. I'm sorry if this is confusing and amateur, but I really need some help. Thanks in advanced.

    Hi
    Create one class that want to be Serializable and implements the Serializable interface on it, then you can serialize the Whole object at once..........
    // Write to disk with FileOutputStream
    FileOutputStream f_out = new
         FileOutputStream("myobject.data");
    // Write object with ObjectOutputStream
    ObjectOutputStream obj_out = new
         ObjectOutputStream (f_out);
    // Write object out to disk
    obj_out.writeObject ( myObject )
    // Read from disk using FileInputStream
    FileInputStream f_in = new
         FileInputStream("myobject.data");
    // Read object using ObjectInputStream
    ObjectInputStream obj_in =
         new ObjectInputStream (f_in);
    // Read an object
    Object obj = obj_in.readObject();
    Regards
    Vinoth

  • Good Practice for managing player high scores & other stats

    During PC based game development, what is a good practice for saving high scores, game history etc for multiple users in terms of the following attributes :
    file types, data types to be used in the file, file protection from manual editing etc.
    pls throw some advice on the popular industry practice in use.
    regards, bittu ch

    During PC based game development, what is a good practice for saving high scores, game history etc for multiple users in terms of the following attributes :
    file types, data types to be used in the file, file protection from manual editing etc.
    pls throw some advice on the popular industry practice in use.
    regards, bittu ch

  • High Score with Applets

    Well, I'm currently in a 'gaming club' at my high school. We are a small group of about 10-12 people that enjoy playing and designing games. Recent accomplishments consist of Battleship, Snake, Airhockey, and a few other minor 3D games.
    As of late, we wanted to take it to the next level. We'd like to put these games on a website in applet-form for everyone to enjoy and comment on. To do this, we'd like to implement a high score count to see who is the best at these games. However, when we tried to do this we ran into a security error. Aparently applets can't write to files. Is there any way around this? Any help would be greatly appriciated. Much thanks.
    - Sange

    Set up a php database. You can communicate between it and your Applet. That's how I do it on GameLizard.com

  • Help with online high scores

    I'm working on a marathon runner game ( http://www.locopuyo.com/MarathonRunnerBeta1.zip ) just for the fun of it. What I am wondering is what the best way to make a high scores list would be.
    I have mySQL on my server, I don't know if that is the best way to do it though.
    I don't know at all how to connect files on the internet with java.
    I was thinking it might be easier if I just had a plain html web site that I could edit in my java program using ftp, but I don't know how to do that and dont' even know if it is possible.
    Any help would be much appretiated.

    since you have MySQL on your server, I'm going to go ahead and assume you have PHP installed also. If so, you can do the highscore work in PHP and just have the game query that script. Basically (if you know anything about PHP and web queries in general) you just query the URL of the PHP script with a few GETVARS. In the simplest (and most easily hacked) way is something like:
    http://yourserver.com/game/highscore.php?action=submit&name=bob&score=5000highscore.php (your script) would then use MySQL to store the data of the GETVARS ($action,$name, and $score).
    All you need in Java to query this script is the URL class.
    URL url = new URL("http://yourserver.com/game/highscore.php?action=submit&name=bob&score=5000");
    url.openConnection(); // this is where it is queriedhighscore.php is where you need to do your database work. If you don't know anything about PHP or if this sounds too easily hacked, you might look into connecting to MySQL via JDBC (see tutorial)
    If I find the time I can make a simple template for you to build off of

  • High scores table without name repeat

    Hello there,
    I have some code which fills a high scores table.. we've decided to give away a prize to the top ten people in the high scores table.. the problem is that people are playing repeatedly and fillnig the high scores table with their name, this makes it unfair to other players as they can't manage to get onto the table !!
    Is there a way I can modify my code to ignore the same name should it appear and skip to the next non repeated name(pseudo) and score ??
    My text boxes are called pseudo1 - pseudo10 and score1 - score10
    Many thanks in advance for your help below is my code :-
    for (var p:uint = 1; p <= 10; p++) {
              var currentPseudo:String = "pseudo" + p;
              var currentScore:String = "score" + p;
              if (event.target.data["pseudo" + p]) {
                   highScoresPage[currentPseudo].appendText(event.target.data["pseudo"+p]);
              if (event.target.data["score" + p]) {
                   highScoresPage[currentScore].appendText(event.target.data["score"+p] + " points"/*/1000 + "s"*/);
              } else {
                   highScoresPage[currentPseudo].appendText(" \n");
                   highScoresPage[currentScore].appendText(" \n");

    I find using Dictionary class for filtering unique names very useful. The code below shows that. Note how array is sorted in descending order:
    var scores:Array = [];
    scores.push( { name: "Peter Smith", score: 32 } );
    scores.push( { name: "Amanda Smith", score: 112 } );
    scores.push( { name: "Peter Smith", score: 23 } );
    scores.push( { name: "Jerry Pak", score: 45 } );
    scores.push( { name: "Peter Smith", score: 80 } );
    scores.push( { name: "Martin", score: 78 } );
    scores.push( { name: "Andrei", score: 99 } );
    scores.push( { name: "Andrei", score: 65 } );
    scores.push( { name: "Martin", score: 76 } );
    scores.push( { name: "Amanda", score: 10 } );
    scores.push( { name: "Peter Smith", score: 73 } );
    // this sorting assures that only highest score for the same name will be presented
    // default sort is ascending
    scores.sortOn("score", Array.NUMERIC);
    var uniquePlayers:Dictionary = new Dictionary();
    // this creates unqie entries
    for each(var obj:Object in scores) {
         // each element is entered only once
         uniquePlayers[obj.name] = obj;
    // reset array
    scores = [];
    // populate with unique names
    for (var key:String in uniquePlayers) {
         scores.push(uniquePlayers[key]);
    scores.sortOn("score", Array.NUMERIC | Array.DESCENDING);
    for each(obj in scores) {
         trace(obj.name, obj.score);

Maybe you are looking for

  • Form feed

    1) In the formfeed what is the length of linesize 2) what is the default date format in formfeed? null

  • Problem in sorting

    Hi, i have created one class named "Person", and i have created 3 instances of this class and i have added them to one ArrayList. i have used "Collection.sort(list)" but i does not sort. i'll appreciate if you tell reply me why it does not work. here

  • Why is a layer blending mode result altered by adding and effect?

    I've done a search online and haven't come up with an answer but does anyone know why a layers blending mode result is altered by adding an effect? I am using CS3 on a PC (Windows XP SP2) and have two layers; one a Tiff and a second a text layer with

  • I am attempting to install latest version of flashplayer on my 1st gen Kindle Fire.

    I am attempting to install latest version of flashplayer on my 1st gen Kindle Fire. The file downloads but get error message stating unable to open file. According to website I am using Mac osx but I have tried in both Windows and MAC with same resul

  • Multiple Libraries - Can't view photos - help!

    I created another library so that I could organize my personal photos from work photos. I imported all my photos into the second library, named it differently from the original IPhoto Library. I can view all these photos just fine. I looked up in the