We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

zeman on 07/10/08


Tagged

textmate font


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

taboularasa
abdsign


Embed Font


Published in: ActionScript 3 


  1. // embeded font, in library set linkage of font for class name
  2.  
  3. var font:buffFont = new buffFont();
  4.  
  5. var buff:TextFormat = new TextFormat();
  6. buff.color = 0xFFFFFF;
  7. buff.font = font.fontName;
  8. buff.size = 32;
  9.  
  10. var fav:TextField = new TextField();
  11. fav.autoSize = TextFieldAutoSize.LEFT;
  12. fav.defaultTextFormat = buff;
  13. fav.selectable = false;
  14. fav.embedFonts = true;
  15. fav.text = "MY FAVORITE CLASS IS";
  16.  
  17. addChild(fav);

Report this snippet 

You need to login to post a comment.