# Movieclip buttons and xml

**URL:** <https://forum.kirupa.com/t/movieclip-buttons-and-xml/211713>\
**Category:** flash\
**Created:** [January 4, 2007, 2:10pm UTC](https://forum.kirupa.com/t/movieclip-buttons-and-xml/211713 "2007-01-04T14:10:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean1983uk](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@sean1983uk](https://forum.kirupa.com/u/sean1983uk)\
**Post date:** [January 4, 2007, 2:10pm UTC](https://forum.kirupa.com/t/movieclip-buttons-and-xml/211713/1 "2007-01-04T14:10:20Z")

</div>

i’m trying to get it so that when different movieclips are pressed it gets the relevant data from an xml file. I thought it would be easy but seem to be having a few problems.

I’m using the following to get all the values from the xml file into flash and when i trace it shows them all being loaded:

if (loaded) {  
xmlNode = findNode(this, “fixtures”);

```
    team = [];
    date = [];
    
    for (i=0; i&lt;xmlNode.childNodes.length; i++) {
        teamNode = findNode (xmlNode.childNodes*, "fixture");
        date = xmlNode.childNodes*.attributes.date;
        
        for (j=0; teamNode.childNodes && j&lt;teamNode.childNodes.length; j++) {
        teamH = teamNode.childNodes[j].attributes.shortname;
        }
        //trace(teamH)
        //trace(date)
        }

```

now how can i search through these and have it only display the requried team and date when the movieclip button is clicked??
