# Multiple xml from buttons

**URL:** <https://forum.kirupa.com/t/multiple-xml-from-buttons/236030>\
**Category:** Uncategorized\
**Created:** [August 16, 2007, 4:44pm UTC](https://forum.kirupa.com/t/multiple-xml-from-buttons/236030 "2007-08-16T16:44:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daylight](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@daylight](https://forum.kirupa.com/u/daylight)\
**Post date:** [August 16, 2007, 4:44pm UTC](https://forum.kirupa.com/t/multiple-xml-from-buttons/236030/1 "2007-08-16T16:44:58Z")

</div>

'lo all,

Using Flash 8 and as2.0 I am trying to create a simple (!) app. that lets a user click one of ten buttons to go to a gallery.

On frame 1 of the .fla I have ten buttons, and on frame 2 a target mc. Frame 2 also has the script to create an xml ‘object’. In the same folder as the .swf, I have ten xml files.

How can I get each button when clicked to ‘pass’ the url for the specific xml file to the xml script in frame 2? My xml script works pertectly if I key in the url, ie

```auto
snacks.load("unit_one.xml");

```

But I want the load() method to be set via the button.

Thanks in advance.

db
