4 Replies Latest reply on Jun 8, 2006 6:49 AM by Tolk

    Loading txt

    Tolk Level 1
      i'm using:

      loadVariablesNum("percentagestext.txt", "/dynamicText");

      to load some text into a dynamic text field (located in mc dynamicText).
      When i test the movie i get the flash error for when it can't find the file:

      Error opening URL "file:///F|/james/StatsRLO/RLO/All/percentagestext.txt"

      I've checked and double checked all the file names etc. and they are same, are yout not allowed capitals in the file path or something?
        • 1. Re: Loading txt
          Level 7
          Shouldn't you be using loadVariables rather than loadVariablesNum?

          "Tolk" <webforumsuser@macromedia.com> wrote in message
          news:e692ha$gmp$1@forums.macromedia.com...
          > i'm using:
          >
          > loadVariablesNum("percentagestext.txt", "/dynamicText");
          >
          > to load some text into a dynamic text field (located in mc dynamicText).
          > When i test the movie i get the flash error for when it can't find the
          file:
          >
          > Error opening URL "file:///F|/james/StatsRLO/RLO/All/percentagestext.txt"
          >
          > I've checked and double checked all the file names etc. and they are
          same, are
          > yout not allowed capitals in the file path or something?
          >
          >


          • 2. Loading txt
            Tolk Level 1
            Oopla forgot when loading into movieclip don't use num
            Wasn't loading into movieclip originally so i forgot to change.
            Thanks for pointing that out, now i feel stupid

            - just changed it and still getting same error???? AHJHHHHHHHHHHHHHHHHHH
            • 3. Re: Loading txt
              Level 7
              I've never used it, but docs say the second argument in loadVariablesNum has
              to be a number indicating a level...

              "Tolk" <webforumsuser@macromedia.com> wrote in message
              news:e6987m$nrs$1@forums.macromedia.com...
              > should be able to use either can't you or am i mistaken?


              • 4. Re: Loading txt
                Tolk Level 1
                forget it, just used a different method:

                dynamicText.txt_textDisplay.variable = "textDisplay0";
                trace(dynamicText.txt_textDisplay.variable);
                loadVarsText = new LoadVars();
                loadVarsText.load("percentagestext.txt.txt");
                loadVarsText.onLoad = function(success) {
                if (success) {
                trace("done loading");
                dynamicText.txt_textDisplay.text = this.textDisplay0;
                } else {
                trace("failed loading");
                }
                }

                just in case anyone in same boat, havent loaded anything from txt file for so long forgot about this till i looked at one of my older projects!