3 Replies Latest reply on Jun 8, 2006 12:05 PM by John_Lilly_5

    loading text problem

      I'm using a loadvars action to load external .txt file, and it loads the file BUT only will read numbers out of the file.
      It won't read letters-which make words- which make sentences-which makes me angry.

      Any idea why this would be? I've tried playing around with the .txt file encoding, would it be something in the AS code? (even thought it has to be loading the file since it is reading the numbers.)

      Any suggestions?
        • 1. Re: loading text problem
          blemmo Level 1
          Should be something with the AS, since the numbers are there, so the loading seems to work. Show some code you use for the text.
          • 2. Re: loading text problem
            John_Lilly_5 Level 1
            *note code uses curFrameNum to load different txt files. This is working. Its just not displaying letters from the txt files.

            Weird, no? Would something in the AS control this? I've tried different encoding options for the txt file but so far none have worked. Would that be it?

            // -----------------<Loading captions A.S.>---------------- \\

            frameNum.autoSize = "center";
            loadedInfo.autoSize = "Left";

            //--------------triger the mcl to load------------------------\\

            var myLV:LoadVars = new LoadVars();

            myLV.onLoad = function (success) {
            if (success) {
            loadedInfo.htmlText = true;
            loadedInfo.htmlText = myLV.info;

            } else {
            loadedInfo.text = "There has been an error loading the requested pictures."

            //--------slide counter----------\\
            var slideInfoLV:LoadVars = new LoadVars();
            slideInfoLV.onLoad = function (success) {
            if (success) {
            } else {
            frameNum.text = "error";


            var curFrameNum: Number = 0;

            function loadFrame() {
            myMCL.loadClip("images/mission" + curFrameNum + ".jpg", this.framesMC);
            this.myLV.load("images/mission" + curFrameNum + ".txt",0);

            function slideCounter() {
            frameNum.text = ("picture " + (curFrameNum +1) + " of " + Number(slideInfoLV.totalFrames));



            // -----------------<TextField.StyleSheet>---------------- \\
            var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
            cssStyles.load ("styles/styles.css");
            cssStyles.onLoad = function (success) {
            if (success) {
            loadedInfo.styleSheet = cssStyles;
            } else {
            loadedInfo.text = "There has been an error loading the requested information. Please contact the Webmaster and report your error.";
            // -----------------</TextField.StyleSheet>---------------- \\

            // -----------------</caption AS>---------------- \\
            • 3. Re: loading text problem
              John_Lilly_5 Level 1
              Corrected in 'General Discussions Forum' ... deleted the text field and made a new one.... works now.... what do you know!