# For loop

**URL:** <https://forum.kirupa.com/t/for-loop/201075>\
**Category:** Uncategorized\
**Created:** [September 18, 2006, 11:10am UTC](https://forum.kirupa.com/t/for-loop/201075 "2006-09-18T11:10:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesleuth](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@thesleuth](https://forum.kirupa.com/u/thesleuth)\
**Post date:** [September 18, 2006, 11:10am UTC](https://forum.kirupa.com/t/for-loop/201075/1 "2006-09-18T11:10:15Z")

</div>

Okay, I am intending to display user’s info on swf and I have stored them in xml files…

```auto

<?xml version="1.0"?>
<users>
    <user1>
        <name>1a</name>
        <link>1b</link>
        <email>1c</email>
    </user1>
    <user2>
        <name>2a</name>
        <link>2b</link>
        <email>2c</email>
    </user2>
    <user3>
        <name>3a</name>
        <link>3b</link>
        <email>3c</email>
    </user3>
</users>

```

This is an example, I hope you get this. So, I have 3 dynamic text field in my fla however I don’t know what instance name I should give. I want to have a loop to help me auto-fill in these three text fields… and my idea is like this…

```auto

for (y=0; y<3; y++) {
    y_name_txt = this.firstChild.childNodes[y].childNodes[y].firstChild.nodeValue;
        }

```

Please try to help, and tutorials or suggestions will be appreciated. Thanks alot for dropping by this post and thanks in advance 😛
