8 Replies Latest reply on Apr 6, 2010 3:45 PM by kglad

    Font/Text resize function works on my local machine, does not work on others.

    Bob Saggot

      I have the fonts embedded (Yet it still prompts me saying missing fonts every time I open flash, but not the fonts that aren't resizing correctly)

       

      I have a function that takes in a textfield, resizes the font to fit the text box, works fine on my local machine, does NOT work on other machines.

       

      Anybody know of reasons why this doesn't work? here is the function

       

      function fontSizeChanger(dtb,myWidth)
      {
           dtb.embedFonts = true;
           
           var myFormat:TextFormat = dtb.getTextFormat();
           var metrics:Object = myFormat.getTextExtent(dtb.text); 
           
           while (metrics.textFieldWidth>myWidth) 
           { 
                myFormat.size--; 
                metrics = myFormat.getTextExtent(dtb.text);
           } 
           
           dtb.setTextFormat(myFormat);
           dtb.embedFonts = true;
      }