textField.autoSize = TextFieldAutoSize.LEFT; textField.text = 'lorem ipsum'; textField.x = (stage.stageWidth - textField.textWidth) / 2;