title: Align the content of a TextField, but keep its width x height
body: <p>In a card game I use a TextField in the middle to display the playing table number, but also to detect if a playing card has been played - using <code>myTextField.hitTestObject(myCard)</code> - which means the TextField's position and dimensions may not change:</p>
  
  <p><img src="https://i.stack.imgur.com/59fVz.png" alt="enter image description here"></p>
  
  <p>My current AS3 code is:</p>
  
  <pre><code>        var format:TextFormat = new TextFormat();
          format.color = 0xFFFFFF;
          format.size = 30;
          format.bold = true;
  
          myTextField.defaultTextFormat = format;
          myTextField.border = true;
          myTextField.borderColor = 0xFFFFFF;
          myTextField.x = W/2-Card.W/2;
          myTextField.y = Card.H;
          myTextField.width = Card.W;
          myTextField.height = Card.H/4;
  
          addChild(myTextField);
  </code></pre>
  
  <p>However the TextField's content (the String <code>"#2029"</code> in the above screenshot) is not in the center of it.</p>
  
  <p>I can not set <code>_middle.autoSize = TextFieldAutoSize.CENTER</code> because this changes the width of the border and breaks <code>hitTestObject()</code>.</p>
  
  <p>Is there another way to align the text in the middle please?</p>