4 Replies Latest reply on Jul 7, 2006 3:27 PM by

    Loading txt problem

      Can someone take a look at this file and see why it's not loading the txt file? It was working earlier, but then when I put the dynamic text field inside of a movie clip so that I could animate it - and changed the reference in the actionscript - it seems to not find it.

      The file can be viewed here:

      the raw fla file can be found here:

        • 1. Re: Loading txt problem
          Jim_Esteban Level 1
          Are you using embedded fonts?
          • 2. Re: Loading txt problem
            Savvy_Spirit Level 1
            No. Right now I have it set to just _sans - so it should be able to pull up a _sans font on the users computer.

            I had it working before I put the "loadedInfo" dynamic text field into it's own movie clip. So it seems to be something with the path - though I changed the paths as well - so I'm not sure why it's not working now.
            • 3. Loading txt problem
              Savvy_Spirit Level 1
              I believe this is where it's having the problem - I just can't figure out why!!!
              I'm not getting the error message either....but all the text is showing up in the 'list variables' debugging tool - so I know something is seeing it..

              (loadedInfo is the name of the dynamic text box, and info is the variable that it looks for in the text file to use in the box. loadedInfo is on the main timeline.)

              var myLV:LoadVars = new LoadVars();

              myLV.onLoad = function(success) {
              if (success && _level0) {
              loadedInfo.htmlText = myLV.info;
              } else {
              loaded = 1;
              loadedInfo.text = "There has been an error loading the requested information. Please contact the webmaster and report your error.";

              • 4. Loading txt problem

                Keeping in mind I probably know less about Flash than most people here...

                So this is only a guess based on trial and error...

                Your script to load the text is currently in the first frame.

                I'm guessing that before you added the animation of the text field you're trying to load, the text field was already on the stage.

                Now that it is not on the stage when the script executes I think the variable does not exist yet.

                I moved the script from frame 1 to frame 6 of the Action layer and now it works.

                I'm sure there is a way to do it from frame 1, probably by declaring the var used inside your text_field movie clip, but I don't know the correct way to do that yet. Lol!

                I hope this helps!