4 Replies Latest reply on Jan 19, 2007 10:23 AM by Jonibean

    Dynamic Text Boxes / Resizing text boxes

    Jonibean Level 1
      I have a site with a dynamic text box that I have initialized (I'm not sure that that is the correct term) at the beginning with:

      myText = new LoadVars();
      myText.onLoad = function()
      { textBox_txt.htmlText = this.content;
      };
      myText.load("text/bio.txt");
      stop();

      Then I have just used a text box throughout with the same instance name, although sometimes I have it on a new keyframe. I assumed I could just keep loading text into it on different frames with:

      stop();
      myText.load("text/performances.txt");

      This appears to be working, except that sometimes it seems to be confused and the text box on a certain frame has the wrong text in it. Do I have to initialize one for each frame in order for them to display the right code? What could be causing it to load another text file if it's frame action is telling it to load something else? It seems unnecessary to have to re-initialize it for a new text box instance in every new frame, but is that the way it has to be done?

      Also, I'm not clear on resizing text boxes. It seems like if I use the width and height numbers to resize this text box on different pages then it changes the size of the text inside, and the scroll bar (the UIScrollbar) is a little squishy looking sometimes. How does this work?

      Thanks for any help.