Posted By

boblinl on 07/28/10


Tagged

text


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Demian
PixelJuice
davidino1978


text field template


 / Published in: ActionScript 3
 

  1. var txt:TextField = new TextField();
  2. var format:TextFormat = new TextFormat("Verdana", 14, 0xFFFFFF);
  3. txt.wordWrap = true;
  4. txt.width = width;
  5. txt.height = height;
  6. txt.multiline = true;
  7. txt.text= city;
  8. txt.autoSize = TextFieldAutoSize.CENTER;
  9. txt.antiAliasType = AntiAliasType.ADVANCED;
  10. txt.cacheAsBitmap = true;
  11. txt.setTextFormat(format);
  12. txt.width = 60;
  13. txt.height= 15;
  14. txt.x = 0;
  15. txt.y = 0;

Report this snippet  

You need to login to post a comment.