# Numbers and text from xml into flash

**URL:** <https://forum.kirupa.com/t/numbers-and-text-from-xml-into-flash/247988>\
**Category:** flash\
**Created:** [January 2, 2008, 3:50pm UTC](https://forum.kirupa.com/t/numbers-and-text-from-xml-into-flash/247988 "2008-01-02T15:50:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bern494](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@bern494](https://forum.kirupa.com/u/bern494)\
**Post date:** [January 2, 2008, 3:50pm UTC](https://forum.kirupa.com/t/numbers-and-text-from-xml-into-flash/247988/1 "2008-01-02T15:50:02Z")

</div>

Hi  
I have generated randomly, 128 unique numbers from (1 to 128) into 128 dynamic text boxes on stage with this code below Each dynamic box is named myTextField1, myTextField2 etc.

```auto

var nums:Array = new Array();
for (var i:Number = 1; i <= 129; i++) {
    nums.push(i);
}
nums.sort(shuffle);
for (i = 1; i <= 129; i++) {
    var temp:TextField = _root["myTextField" + i];
    temp.text = nums*;
}

function shuffle():Number {
    return Math.floor(Math.random() * 3 - 1);
}

```

These numbers represent a team name which I have listed with there own number in a xml file called teams.xml

```auto
 
<teams>
<team><name>Accrington Stanley</name><number>1</number></team>
<team><name>Aldershot Town</name><number>2</number></team>
<team><name>Altrincham</name><number>3</number></team>
<team><name>Arsenal</name><number>4</number></team>
etc etc
</teams>

```

I would like to show these teams has they are drawn, into a text area, text box or anything that will represent the team from the drawn numbers.ie,  
Drawn numbers 2, 4, 3, 1 show Aldershot v Arsenal then below Altrincham v Accrington Stanley and so on…  
Basically I am trying to create a 128 team draw giving me 64 games, I will hopefully then am able to repeat the draw with 64 teams, then 32 teams until we are down to two.  
I have tried various ways of achieving this using an xml connector but I cannot get it to work?

Any help appreciated  
Bern. Flash CS3 AS2.0
