jan_flanders

Untitled

Dec 7th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Regular textfield:
  2. tf.text = "Hello";
  3.  
  4. //---------------------------------------------
  5. //TLF:
  6. var fontDescr = new FontDescription();
  7. fontDescr.fontName = font.fontName;
  8. fontDescr.fontPosture = FontPosture.NORMAL;
  9. fontDescr.fontLookup = FontLookup.EMBEDDED_CFF;
  10. //fontDesc.fontLookup = flash.text.engine.FontLookup.DEVICE;
  11. fontDescr.renderingMode=RenderingMode.CFF;
  12. //fontDesc.renderingMode=flash.text.engine.RenderingMode.NORMAL;
  13.  
  14. var fmt = new ElementFormat();
  15. fmt.fontDescription = fontDescr;
  16. fmt.fontSize = 30;
  17. fmt.color = 0xFF0000;
  18.            
  19. var str = "Hello ";
  20. var textBlock = new TextBlock();
  21. var textElement = new TextElement(str, fmt);
  22. textBlock.content = textElement;
  23. var line = textBlock.createTextLine(null, 800);
  24. line.x = line.y = 200;
  25. addChild(line);
Advertisement
Add Comment
Please, Sign In to add comment