1 Reply Latest reply on Jan 5, 2007 1:37 AM by arunbe

    loading text from file

      I want to load one line of a text file on my hard drive into a string variable in an actionscript class. I've looked up loadVariables, and it looks like I'd have to have change each line (17000+) of my text file to include at variable name, and create 17000+ new variables. I've looked up loadVars, and I see stuff about loading from websites and XML formatting. I'm not sure how to proceed. What's the simplest way to just take a specified line of a text file and set a string variable in a class to that line?
        • 1. Re: loading text from file
          arunbe Level 1
          Its always better using the XML instead of text files.
          However, you already prepared some text files.
          But, you have use the variable name in the text files , so that only you can retrieve them by loading.
          I added some samples for loadVars. It may be helpful for you...