16 Replies Latest reply on Apr 17, 2008 1:59 PM by kglad

    TextFormat not formating my text... Why?

    brian914 Level 1
      This is not styling my text. What am I doing wrong?

      Thank you!!!


      this.textScroll.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 255, 200);
      textScroll.my_txt.multiline = true;
      textScroll.my_txt.html = true;
      textScroll.my_txt.embedFonts = false;
      textScroll.my_txt.wordWrap = true;
      textScroll.my_txt.autoSize = "left";
      textScroll.my_txt.condenseWhite = true;


      var tFormat_tf:TextFormat = new TextFormat();
      tFormat_tf.bold = true;
      tFormat_tf.italic = true;
      textScroll.my_txt.setTextFormat(tFormat_tf);


      var loadText_lv:LoadVars = new LoadVars();
      var textDocPath:String = "../txt/curriculum_vitae.txt";
      loadText_lv.load(textDocPath);
      loadText_lv.onLoad = function(success) {
      if (success) {
      // trace(success);
      textScroll.my_txt.htmlText = this.myText;
      } else {
      textScroll.my_txt.text = "Error connecting to server.";
      }
      };