# Creating multiple text fields

**URL:** <https://forum.kirupa.com/t/creating-multiple-text-fields/149826>\
**Category:** Uncategorized\
**Created:** [June 1, 2005, 5:07pm UTC](https://forum.kirupa.com/t/creating-multiple-text-fields/149826 "2005-06-01T17:07:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jankratochvil](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jankratochvil/32/566_2.png) [@jankratochvil](https://forum.kirupa.com/u/jankratochvil)\
**Post date:** [June 1, 2005, 5:07pm UTC](https://forum.kirupa.com/t/creating-multiple-text-fields/149826/1 "2005-06-01T17:07:36Z")

</div>

I try to create with loop more text fields but i my code no works ;(

```auto
		for (i = 0; i < total; i++)
		{
			var_descr_gall = "descr_gall_" + i;
			_root.createTextField (var_descr_gall, i, 0, 0 * i, 200, 20);
			var_descr_gall.border = true;
			var_descr_gall.text = "aaa";
			trace ("var_descr_gall = " +var_descr_gall.text );
		}
	}

```

The var\_descr\_gall.text is undefinied.

Later i need load in this text fields content of XML. Something like that:

```auto
var_descr_gall.text =xmlNode_gal.childNodes*.childNodes[0].firstChild.nodeValue;

```

Thanks
