[F8 AS2] photo gallery using varying xml's

please excuse me, i know similar topics have already been resolved, but i can’t figure this out for the life of me. i have my photo gallery (thanks to the kirupa tut!) and can get it to load a single gallerycontent.xml file. what i want to do is use my single flash photo gallery to display photos from multiple xml’s.

i’m thinking that i need to use some sort of FlashVars attribute in the embed tag of the published html, but i can’t figure out how to tell my flash file to look for it…

here’s my AS (i think the problem lies in this chunk):

[COLOR=gray]function loadXML(loaded) { [/COLOR]
[COLOR=gray]if (loaded) { [/COLOR]
[COLOR=gray]xmlNode = this.firstChild; [/COLOR]
[COLOR=gray]image = []; [/COLOR]
[COLOR=gray]description = []; [/COLOR]
[COLOR=gray]total = xmlNode.childNodes.length; [/COLOR]
[COLOR=gray]for (i=0; i<total; i++) { [/COLOR]
[COLOR=gray]image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue; [/COLOR]
[COLOR=gray]description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue; [/COLOR]
[COLOR=gray]} [/COLOR]
[COLOR=gray]firstImage(); [/COLOR]
[COLOR=gray]} else { [/COLOR]
[COLOR=gray]content = “file not loaded!”; [/COLOR]
[COLOR=gray]} [/COLOR]
[COLOR=gray]} [/COLOR]
[COLOR=gray]xmlData = new XML(); [/COLOR]
[COLOR=gray]xmlData.ignoreWhite = true; [/COLOR]
[COLOR=gray]xmlData.onLoad = loadXML; [/COLOR]
[COLOR=gray]xmlData.load("[COLOR=red]HCAGG3[/COLOR]/gallerycontent.xml");
////////////////////////////////[/COLOR]
of course, i want to dynamically change the [COLOR=red]HCAGG3[/COLOR] directory so it can be defined via the HTML page the flash file is on.

thanks in advance!!!