1 Reply Latest reply on Sep 9, 2007 1:34 PM by dsimpson_cs3

    Load txt file using flash vars

    rkangas
      I have a project where text is being loaded dynamically with a text file. The request is that the text file be loaded through parameters in the object tag so that if the location on the server changes the path to the txt file can be easily changed.

      Anybody have any idea how I might be able to do this? I've tried using flasvars but apparently don't understand the process well enough or it is not the right solution.

      Any help would be appreciated.
        • 1. Re: Load txt file using flash vars
          dsimpson_cs3
          You could pass the location of the file as FlashVars, then load the vars using LoadVars.

          <param name="FlashVars" value="varLocation=http://www.thesite.com/myVars.txt" >

          .. then your code

          var myVars:LoadVars = new LoadVars();

          myVars.load(_level0.varLocation); // add error checking

          trace(myVars.varName);