2 Replies Latest reply on Aug 26, 2010 2:57 PM by Bob Saggot

    TLFText needs to fit width of text box.

    Bob Saggot

      I used classic text before and this code works.

       

      var myFormat:TextFormat = dtb.getTextFormat();
           while(dtb.textWidth>=dtb.width)
           {
                myFormat.size = int(myFormat.size) - 1;
                  dtb.setTextFormat(myFormat);
           }
                trace("best is: " +myFormat.size);
                trace("dtb.textWidth: " + dtb.textWidth);
           myFormat.size = int(myFormat.size) - 1;
           dtb.setTextFormat(myFormat);
      

       

       

      but I need to switch the text boxes over to TLFText because we are going multi-language, and this function no longer works, I have no idea how to do the same thing with TLFText?

       

      Thanks