1 Reply Latest reply on Dec 4, 2006 9:32 AM by duckets

    Using a text file

    Leegee3 Level 1
      Hey guys. I would like to use a text file or even a database if possible to save high scores of a game.

      The user would enter their name into a text input field and would continue to play the game. I would like to save the name and their score to a text file or database and then be able to recall it if the user clicks on the button, "high scores".

      I really dont know how to do this, any help please

        • 1. Re: Using a text file
          duckets Level 1
          Do you mean a web-based scoreboard, or a local scoreboard?

          For a local one, you could store and retrieve the list of scores using the 'setpref' and 'getpref' commands.

          For a web based one, you'll need to have a server-side script (php, asp, or something similar) which accepts a 'post' request from director (using the 'postNetText' lingo command). The server script will need to store the name & score either in a database or in a writable text file on the server, and perform the sorting of the score list.

          Try googling for flash scoreboard tutorials, and adapting to director by using 'postNetText' or 'getNetText' to send and receive the data.

          hope this helps!

          - Ben