7 Replies Latest reply on Sep 30, 2010 7:16 PM by Ned Murphy

    Flash Game High Scores Board

    kapelski

      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

        • 1. Re: Flash Game High Scores Board
          Ned Murphy Adobe Community Professional & MVP

          If you have a non-working attempt where you can show the code that is failing, then somewone here may be able to help get it working.  But why do you say you went out on a limb by trying a few of a ton of tutorials you found?  You need to try more until you find one that you can understand.  To expect that someone here is going to create/find and provide a tutorial for you that will somehow prevail where others have failed is a further stretch than that limb.

          1 person found this helpful
          • 2. Re: Flash Game High Scores Board
            kapelski Level 1

            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

            • 3. Re: Flash Game High Scores Board
              Ned Murphy Adobe Community Professional & MVP

              Look into using the LoadVars class instead of the loadVariables method.  Try searching Google using "AS2 LoadVars tutorial".  Here's one link from that search...

               

              http://www.flash-here.com/tutorials/flash_loadvars_sample.html

              • 4. Re: Flash Game High Scores Board
                kapelski Level 1

                That looks pretty straight forward.  Will I need to change my PHP script at all to use that method?  Or will it work with what i currently have provided i use all the correct variable names?

                 

                kapelskic

                • 5. Re: Flash Game High Scores Board
                  Ned Murphy Adobe Community Professional & MVP

                  I'd lean toward the latter, though I have no idea how you script is written.  Your best bet is to try it first, even as a separate focused test to see what works.  Then see about working it into your game afterwards.

                  1 person found this helpful
                  • 6. Re: Flash Game High Scores Board
                    kapelski Level 1

                    Is that tutorial that you sent a link to AS2 code or AS3.  I have never dealt with something like that in AS2 before.  But like I said I am very new to Flash.

                    • 7. Re: Flash Game High Scores Board
                      Ned Murphy Adobe Community Professional & MVP

                      LoadVars doesn't exist in AS3.  The reason I used AS2 in the search terms is by habit... it usually works out very nicely... probably because using just the AS version (AS2 vs AS3) in Google searches helps tie the search into both Flash and the version of AS you intend.  I would be less likely to use "Flash LoadVars tutorial" though it could work well enough since AS3 doesn't have it.... just habit.

                      1 person found this helpful