# So simple it has to work... but doesnt grr

**URL:** <https://forum.kirupa.com/t/so-simple-it-has-to-work-but-doesnt-grr/601455>\
**Category:** flash\
**Created:** [April 2, 2015, 12:37pm UTC](https://forum.kirupa.com/t/so-simple-it-has-to-work-but-doesnt-grr/601455 "2015-04-02T12:37:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottiescotsman](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@scottiescotsman](https://forum.kirupa.com/u/scottiescotsman)\
**Post date:** [April 2, 2015, 12:37pm UTC](https://forum.kirupa.com/t/so-simple-it-has-to-work-but-doesnt-grr/601455/1 "2015-04-02T12:37:33Z")

</div>

I dynamically added a textField and set text format and all the usual stuff … and it works… but all the sizes are wrong and for some reason I think its not measuring the sizes in pixels.

the little\_Text.x = 0; and .y= 0 are correct and display correct but all the other sizes are miles off, even font.size = 13 is like 30+ size please help…

```
var myFont = new Font3();

var tf:TextFormat = new TextFormat();
tf.size = 13;
tf.align = TextFormatAlign.CENTER;
tf.font = myFont.fontName;
tf.color = 0x000099;

var title_Text:TextField = new TextField();
title_Text.setTextFormat(tf);
title_Text.embedFonts = true;
title_Text.antiAliasType = AntiAliasType.ADVANCED;
title_Text.width = sqBlack.width;
title_Text.text = "THE DARK KNIGHT";
sqBlack.addChild(title_Text);

title_Text.wordWrap = true;
title_Text.height = 40;
title_Text.x = 0;
title_Text.y = 0;
title_Text.background = true;    
title_Text.backgroundColor = 0xFFFF00;
title_Text.setTextFormat(tf);
```
