XML Gallery Mod Question

I am trying to make multiple galleries with a series of buttons. I am trying to make each button populate the ActionScript to call for a new xml file. Here is the code I need to dynamically populate.

xmlData.load(“images.xml”);

How do I make this a variable of some kind and then use a button to populate it. Here is my best stab at it… I know nothing about this. Please help…

My Example:
MAIN AS CODE: xmlData.load(gallery);
BUTTON 1 CODE: gallery==images1.xml
BUTTON 2 CODE: gallery==images2.xml

Please help me make this really work. Thank you.