# createTextField

**URL:** <https://forum.kirupa.com/t/createtextfield/120690>\
**Category:** Uncategorized\
**Created:** [August 26, 2004, 3:21pm UTC](https://forum.kirupa.com/t/createtextfield/120690 "2004-08-26T15:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SePP](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@SePP](https://forum.kirupa.com/u/SePP)\
**Post date:** [August 26, 2004, 3:21pm UTC](https://forum.kirupa.com/t/createtextfield/120690/1 "2004-08-26T15:21:44Z")

</div>

I tried everything, it works perfectly without the loop but when I try to put it in a loop it displays nothing.  
I figured out it has something to do with the naming of mytext, It seems it needs to be quoted ☹ I colored red where I think the fault is.

```auto

xwaarde = 20;
for(i=0;i<3;i++){
mytext = "mytext"+i;
_root.createTextField([COLOR=Red]mytext[/COLOR], i, xwaarde, 100, 50, 100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
mytext.text = "this is my first test field object text";
xwaarde = xwaarde+80;
}

```

the following works perfectly :

```auto

xwaarde = 20;
_root.createTextField("mytext", 0, xwaarde, 100, 50, 100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
mytext.text = "this is my first test field object text";

```

thanks
