3 Replies Latest reply on Oct 21, 2007 3:10 PM by somedumkid

    load text variables


      I need help regarding the action script loadVariables. I have given a detailed clarification below, but for better understanding please download the source file from the URL given below.

      I am using an external text file labeled (news.txt) which is loaded from a flash movie using the following actionscript:

      loadVariablesNum("news.txt", 0);

      This works quite fine indeed and it loads the data from the external file, but when I create a movie clip symbol and double click this symbold in order to get within this movie clip, the variable doesn't load. To be more clear, please create a movie clip symbol by hitting F8 on your keyboard and then double click this movie clip symbol. This means you will be within the movie clip symbol. Put the above mentioned actionscript load variable >> loadVariablesNum("news.txt", 0); << actionscript in the first frame within the movie clip where you currently are and of course a dynamic textfield where the text should show and give the variable name on the properties panel to this dynamic textfield as: textField
      Externally, you should have this text file in the same directory of the flash movie labeled as: news.txt Put this in the text file: textField= "Hello" and save the file.

      You will notice that the text is not loaded in flash since all the abovementioned components are within a movie clip symbol as mentioned above.
      You can also download the source files in this URL to better grasp what I mean.


      I greatly appreciate your help and I am looking forward to hearing from you.

      Respectfully yours,
        • 1. Re: load text variables
          SymTsb Level 2
          why don't you just use the following syntax...

          target_mc.loadVariablesNum("news.txt", target_mc.getNextHighestDepth());

          rather than putting your loadVariables statement inside the movie clip itself? Your movie would still have the same setup as above just calling from another location in the timeline.
          • 2. Re: load text variables
            beko75 Level 1
            Hello SymTsb,

            Thanks for your answer indeed. I tried your provided syntax above but it still doesn't work. Probably I am missing something :(
            Is it possible for you te create a flash movie together with its external txt file and upload it somewhere in a server where I can download it. I will be able to understand it much better by providing me with the source files?

            Thanks again,

            Respectfully yours,
            • 3. Re: load text variables
              I am not sure if this is what i should use for my project. I am making a web app that provides a script for posting a flash video. The tricky part is I need to insert variables into the script. I know how to display text in a field but how can i have existing text and specify where i would like to have a variable number appear within that text. such as "flashvars="phone= age= hieght=" and have the variables that are already defined in the video be inserted into the provided script. Please help me, I'm reaching my deadline quickly!