# Dynamic positioning of XML text

**URL:** <https://forum.kirupa.com/t/dynamic-positioning-of-xml-text/124688>\
**Category:** Uncategorized\
**Created:** [October 5, 2004, 11:47pm UTC](https://forum.kirupa.com/t/dynamic-positioning-of-xml-text/124688 "2004-10-05T23:47:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mona](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mona](https://forum.kirupa.com/u/Mona)\
**Post date:** [October 5, 2004, 11:47pm UTC](https://forum.kirupa.com/t/dynamic-positioning-of-xml-text/124688/1 "2004-10-05T23:47:58Z")

</div>

Hi!

I have XML text I load into different MCs with attachMovie. For each XML node I create a new MC with 3 text fields and place it on stage.

I need to (but can’t!!) place each MC under the previous one, and \_y will depend on the previous MCs height (amount of text). It is the third text field (txt3) that would have varying height.

for (var i = 0; i\<news.length; i++) {  
item = Container.attachMovie(“newi”, “newi”+i, i);  
item.txt1 =this.firstChild.childNodes\*.childNodes[0].firstChild.nodeValue;  
item.txt2= this.firstChild.childNodes\*.childNodes[1].firstChild.nodeValue;  
item.txt3 = this.firstChild.childNodes\*.childNodes[2].firstChild.nodeValue;  
item.\_x = 80;  
item.\_y = ???;

}

Does this make any sense? Any help would be much much appreciated!!  
Thanks in advance!
