15 Replies Latest reply: Nov 2, 2010 10:19 AM by kglad RSS

    Bold in dynamic Text

    leaflashdev Community Member

      Hello,

       

      I have a dynamic text on my stage called text_txt

       

      I want to write the html code <b><u>test</b></u>

      so here is my code

       


      add_txt_style(text_txt);
      function add_txt_style(t:TextField):void {
        
          t.condenseWhite = true;
          t.selectable = false;
          var frm:TextFormat = new TextFormat();
          frm.font = "Arial"; // the real font name
          frm.size = 14;
          frm.bold = true
          t.antiAliasType = "advanced";
          t.gridFitType = "pixel";
          t.embedFonts = true;
          t.setTextFormat(frm);
        
      }

       

      text_txt.htmlText = "<b><u>test</b></u>"

       

      The text is UNDERLINED BUT NOT BOLD

       

      Do I miss something ?

       

      Thanks a lot