# Load XMLtext into dynamically created TextFields. How to?

**URL:** <https://forum.kirupa.com/t/load-xmltext-into-dynamically-created-textfields-how-to/311238>\
**Category:** flash\
**Created:** [June 30, 2010, 10:40pm UTC](https://forum.kirupa.com/t/load-xmltext-into-dynamically-created-textfields-how-to/311238 "2010-06-30T22:40:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_f](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@chris\_f](https://forum.kirupa.com/u/chris_f)\
**Post date:** [June 30, 2010, 10:40pm UTC](https://forum.kirupa.com/t/load-xmltext-into-dynamically-created-textfields-how-to/311238/1 "2010-06-30T22:40:03Z")

</div>

hi there,

I have made some changes to kirupa’s thumbnail gallery, so instead of loading thumbnails into the scroller, I’d like it to load TextInput from a Node in the XML.

what I’ve come up with so far (simplified):

```auto

function numbering_fn(k) { 
	
numbers_mc.createTextField("t"+k, numbers_mc.getNextHighestDepth(),20*k, 0,10,10);

numbers_mc.t[k].text = numbering[k] ;
numbers_mc.t[0].textColor = 0xFFffff;

trace (numbers_mc.t[0].text );
};

 

```

where:  
\*k \*= argument passed to the function from the loadXLM function…  
_numbers\_mc_ = empty movieclip in my scene.

in my understanding, since the loadXML function is still looping, it should create an empty TextField and then assign a _.text_ Value to it.

Aparently it creates the required number of empty TextFields, but the “_numbers\_mc.t[k].text = “whatever Text”;_” -bite doesn’t do the trick…:puzzled:

could some one please help me out here or explain why this doesn’t work?

any help would be appreciated.

best regards, chris
