# createTextField problem

**URL:** https://forum.kirupa.com/t/createtextfield-problem/215325
**Category:** Uncategorized
**Created:** [February 6, 2007, 12:34pm UTC](https://forum.kirupa.com/t/createtextfield-problem/215325 "2007-02-06T12:34:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pe\_TuLo](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pe\_TuLo](https://forum.kirupa.com/u/pe_TuLo)
#### Post date: [February 6, 2007, 12:34pm UTC](https://forum.kirupa.com/t/createtextfield-problem/215325/1 "2007-02-06T12:34:41Z")

</div>

Hi all,  
i have a little problem… I want create 3 dynamic text fields with createTextField function and i want apply a TextFormat on all three text fields.  
I use this code:

var textWidth:Number = 365;  
var textHeight:Number = 70;  
var textX:Number = 285;  
var textY:Number = 92;  
var textStyle:TextFormat = new TextFormat();  
textStyle.font = “Arial”;  
textStyle.size = 11;  
textStyle.color = 0x646464;

for (var i:Number = 0; i \< 3; i++) {  
\_root.createTextField(“text” + i, 1, textX, textY, textWidth, textHeight);  
\_root[“text” + i].setTextFormat(textStyle);  
\_root[“text” + i].multiline = true;  
\_root[“text” + i].html = true;  
\_root[“text” + i].text = "Testing " + i;  
textY = textY + 120;  
}

but the problem is, that only one text field is created - text2, and also TexTFormat can´t be apply to this text field. If someone know where is the problem i would be really thankfull :}
