1 Reply Latest reply: Jun 3, 2010 9:18 PM by kglad RSS

    TextArea fonts

    Fumph Community Member

      I have a textArea (note: not a textfield) and I want to have a list of fonts that you can choose from. When a font is selected, when you type in the textarea it uses that font. So what Im asking is what's the code to change the font?

        • 1. Re: TextArea fonts
          kglad CommunityMVP

          var yourtextformat:TextFormat=new TextFormat();

          var f:Font=new F();  // add this class with Font base class

          yourtextformat.font=f.fontName;


          yourtextarea.setStyle("embedFonts",true);

          yourtextarea.setStyle("textFormat", yourtextformat);