# Getting a value based on variable result

**URL:** <https://forum.kirupa.com/t/getting-a-value-based-on-variable-result/222045>\
**Category:** Uncategorized\
**Created:** [April 10, 2007, 12:41pm UTC](https://forum.kirupa.com/t/getting-a-value-based-on-variable-result/222045 "2007-04-10T12:41:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graylensman](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@graylensman](https://forum.kirupa.com/u/graylensman)\
**Post date:** [April 10, 2007, 12:41pm UTC](https://forum.kirupa.com/t/getting-a-value-based-on-variable-result/222045/1 "2007-04-10T12:41:48Z")

</div>

Here’s what I’m trying to do. I’ve got a movie clip that contains a varying number of text fields based on loaded XML data. The heights of the text fields will change depending on the amount of text loaded in.

Since this is driven by XML, I’m using a for loop to walk the tree and create array references for my text fields.

I need to determine the final height value of all these text fields in order to calculate the \_y coordinate for another movie clip. And my natural inability to think mathematically is hamstringing my efforts.

Any solutions are welcome and appreciated!
