3 Replies Latest reply on May 9, 2008 1:14 AM by addybombaddy

    reading and writing to files

    addybombaddy Level 1
      i am trying to read and write to a file and would like some help please.

      i have created a game and would like to store the high scores in a text file on the local computer.

      i have an input text field where the player can enter the name, i would like to send this to a text file.

      i also need to be able to read from this text file to compare the scores

      and need to create the text file if there isn't one on the computer.

      this is what i have typed so far:

      var my_lv:LoadVars = new LoadVars();
      my_lv.playerName = playerName.text;
      my_lv.playerScore = Score;
      my_lv.load("setscore.cfm", "_self", "POST");

      i don't know if this is right, i have not had to do this kind of thing before and would really appreciate any help.

      thank you in advance!