setTextFormat( ) does not apply to future text assignments : Text format : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Text format »

 

setTextFormat( ) does not apply to future text assignments


 


package{
  import flash.display.Sprite;
  import flash.text.*;  
  public class Main extends Sprite{
    public function Main(){

        var t:TextField = new TextField(  );
        t.autoSize = TextFieldAutoSize.LEFT;
        
        var format:TextFormat = new TextFormat(  );
        format.font = "Arial";
        format.size = 20;
        format.bold = true;
        
        t.setTextFormat(format);
        
        t.text = "ActionScript is fun!";
        addChild(t);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo TextField
» Text format