# Txt field reading only first data of xml

**URL:** https://forum.kirupa.com/t/txt-field-reading-only-first-data-of-xml/223337
**Category:** Uncategorized
**Created:** [April 21, 2007, 12:46pm UTC](https://forum.kirupa.com/t/txt-field-reading-only-first-data-of-xml/223337 "2007-04-21T12:46:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rosanna](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rosanna](https://forum.kirupa.com/u/rosanna)
#### Post date: [April 21, 2007, 12:46pm UTC](https://forum.kirupa.com/t/txt-field-reading-only-first-data-of-xml/223337/1 "2007-04-21T12:46:35Z")

</div>

[SIZE=1]I meet a strange problem by extracting xml datas to a dynamic txt field( name [COLOR=red]txtThumb[/COLOR]) nested in a movie clip( name [COLOR=red]mcThumb[/COLOR]).[/SIZE]

[SIZE=1][/SIZE]  
[SIZE=1]I can extract particular datas from the xml:[/SIZE]  
[SIZE=1]initThumb.number=(xmlPhotos.firstChild.childNodes\*.childNodes[3].firstChild);// tracing is ok.( nodes are numbers bteew 1 to 78)[/SIZE]

[SIZE=1][/SIZE]  
[SIZE=1]But text field only reads the first data of the list :[/SIZE]  
[SIZE=1]initThumb.onRelease = function() {[/SIZE]  
[SIZE=1]\_root.mcScroller[thumbname].[COLOR=red]txtThumb[/COLOR].text = this.number;[/SIZE]  
[SIZE=1]}// target the text located in the mc but only the number 1 is read and repeats itself( tracing gives the same: 1 1 1 1 1 1 and not 1 2 3 4 5 etc…)[/SIZE]

[SIZE=1]Here is the function that creates the mcThumb.[/SIZE]  
[SIZE=1]function makeAThumb(num) {[/SIZE]  
[SIZE=1]thumbname = “[COLOR=red]mcThumb[/COLOR]”+num;[/SIZE]  
[SIZE=1]mcScroller.attachMovie(“thumb”, thumbname, num, initThumb);[/SIZE]  
[SIZE=1]mcScroller[thumbname].mcPhoto.loadMovie(“images/tthumb/”+mcScroller[thumbname].photo+"");[/SIZE]  
[SIZE=1]}[/SIZE]

[SIZE=1]NOTE : everything apart from that works great. All datas are loaded as for movie clips as for other dynamic text fields located on the main stage.[/SIZE]

[SIZE=1]Somebody could help me, I really have no clue of what is happening,[/SIZE]  
[SIZE=1]Thank you.[/SIZE]

[SIZE=1][/SIZE]

[SIZE=1]…[/SIZE]  
[SIZE=1]…[/SIZE]  
[SIZE=1]…[/SIZE]
