1 Reply Latest reply on Sep 18, 2007 7:57 PM by kglad

    [F8] Help! Whitespace is driving me bananas!

    xevioso
      Hi folks. I cannot find a solution for this problem. I have looked all over the web for this and spent a few hours on this problem. :-(

      I have a textarea on the stage. The a textbox is loaded with HTML from a txt file. Here is the order of how the item is loaded.

      mytextboxstyle = new TextField.StyleSheet();
      mytextboxstyle.load("textarea_style.css");
      mytextbox.styleSheet = mytextboxstyle;
      mytextbox.html = true;
      mytextbox.condenseWhite = true;
      mytextbox.wordWrap = true;
      mytextbox.multiline = true;
      mytextbox.setStyle("borderStyle" , "none");

      loadtextContent = new LoadVars();
      loadtextContent.load("textarea_contact1.txt");
      loadtextContent.onLoad = function(success) {
      if (success) {
      mytextbox.text = this.mytext;
      }
      };

      The problem is, no matter what I do, I cannot get the extra white spaces out of the text that appears. The text is simple, say:

      mytext=<p>This will be the text that will show on the webpage.
      item A
      item B
      item C</p>

      But I always get extra carriage returns in between the lines. I am completely stumped. CondenseWhite does not appear to work for me. The file is saved as UTF-8 txt file, I have saved it multiple formats to test.

      When I try changing
      mytextbox.text = this.mytext;

      to

      mytextbox.htmlText = this.mytext;

      It won't even load, which completely stumps me.

      I'd sure appreciate this if anyone could shed some light on what might be causing this. I am pulling my hair out over this.