5 Replies Latest reply on Sep 1, 2010 12:03 PM by Ned Murphy

    dynamic loading text problem

    theloogybear1

      Hello all,

       

      I am in the process of building a web site and am running into an issue with dynamic loading text.

       

       

      I am trying to make a scrolling news section with a stage of 200 W x 250 L

       

      Created a movie clip with the following coding:


      var myTextLoader:URLLoader = new URLLoader();
      var myTextField_txt:TextField = new TextField();
      myTextField_txt.wordWrap=true;

       

      myTextLoader.addEventListener(Event.COMPLETE, onLoaded);

       

      function onLoaded(e:Event):void {
      myTextField_txt.text = e.target.data;
      addChild(myTextField_txt);
      }

       

      myTextLoader.load(new URLRequest("myText.txt"));

       

      Then set the clip (which is 250 W x 600 L) on the main stage, moving upwards, creating the auto scroll effect.

       

      The problem I am running into is that I can't figure out how to make the text use the whole width of the text box I created. It only uses half of the width, creating columbs like this:

       

      Hello and

      welcome

      to our new

      web site!

       

      Etc.etc.

      etc.etc.

       

      The text box itself is at least twice the width of the sentences, but they aren't using the full width.

       

      Any ideas??