title: TextFieldAutoSize and textWidth in AS3
body: <p>I'm trying to draw a background to a text field in AS3.</p>
  
  <p>I have a TextField with an embedded font and using autoSize = TextFieldAutoSize.LEFT.  I assign the text to the TextField then call try to draw a roundedRect using the textWidth of the TextField.  The text field width is always smaller than the actual text width.  </p>
  
  <p>Is there another way to get the actual textwidth?  I did a few quick google searched but I haven't found anything.</p>
  
  <p>Code:</p>
  
  <pre><code>var tfProgramName:TextField = TextUtil.createTextField(true,"Arial",20,true);
  tfProgramName.width = 100;
  tfProgramName.autoSize = TextFieldAutoSize.LEFT;
  tfProgramName.x = 5;
  tfProgramName.y = 5;
  addChild(tfProgramName);
  
  tfProgramName.text = _program.title;
  background.graphics.clear();
  background.graphics.beginFill(0xFF0000,0.75);
  background.graphics.drawRoundRect(0,0,tfProgramName.textWidth+10,this.height+10,5,5);
  background.graphics.endFill();
  </code></pre>
  
  <p>textWidth in my case is something like 373, but it should be closer to 400.  It's definitely close, but it doesn't seem to take into account the font or font size.</p>