Dynamic input text field

Dynamic input text field

Hi all,

This is possible to dynamically create input textfields and then style them with new textFormat something like
[AS]
this.createTextField(“txtBox_txt”, 1, 50, 50, 200, 20);
textBox = new TextFormat();
textBox.background = true;
textBox.backgroundColor = 0xffffff;
textBox.bold = true;
txtBox_txt.setNewTextFormat(textBox);
[/AS]
or is it possible to use the new TextFormat object on a input text field that is manually been placed on the stage. So I create a input text field called input_txt and then style it.
[AS]
textBox = new TextFormat();
textBox.background = true;
textBox.backgroundColor = 0xffffff;
textBox.bold = true;
input_txt.setNewTextFormat(textBox);
[/AS]