# Getting height of xml loaded text field

**URL:** <https://forum.kirupa.com/t/getting-height-of-xml-loaded-text-field/281034>\
**Category:** flash\
**Created:** [February 4, 2009, 6:40am UTC](https://forum.kirupa.com/t/getting-height-of-xml-loaded-text-field/281034 "2009-02-04T06:40:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mactoons](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mactoons](https://forum.kirupa.com/u/mactoons)\
**Post date:** [February 4, 2009, 6:40am UTC](https://forum.kirupa.com/t/getting-height-of-xml-loaded-text-field/281034/1 "2009-02-04T06:40:48Z")

</div>

Hi,

I am trying to make a flash blog and basically I need to be able to load in text from an xml file into the different text fields I have setup and then I need to read the height of the loaded text so I can position the next post correctly below it.

```auto

blog_xml = new XML();
blog_xml.ignoreWhite = true;
blog_xml.onLoad = function(success) {
    if (success) {

post_main.attachMovie("blogpost_clip","post_clip",this.getNextHighestDepth());
post_main.post_clip.posttext.text=blog_xml.firstChild.childNodes[0];
trace(post_main.post_clip.posttext._height);        

    }
};
blog_xml.load('blog.xml');

```

This code returns the height of the text field BEFORE the xml text is  
added, I can’t figure out how to make this script wait until after it  
is added.

Any ideas?
