Ho un problema con una galleria immagini dinamica, non riesco a farla funzionare se ne inserisco una seconda. Mi spiego meglio.


Ho questo codice nel primo frame di scene1:

function onFinish(success_boolean, results_obj, xml)
{
if (success_boolean)
{
play ();
} // end if
} // End of the function
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.align = "MC";
Stage.scaleMode = "noScale";

this.cacheKiller = "true";
this.linkGallery = 0;
this.titleGallery = 0;
stop ();
var parsed_obj = {};
var unCash = new Date().getTime();
if (this.cacheKiller == "true")
{
fileToLoad = "main.xml?cacheKiller=" + unCash;
fileToLoad = "main.xml";


}
else
{
fileToLoad = "main.xml";


} // end else if
gs.dataTransfer.XMLParser.load(fileToLoad, onFinish, parsed_obj);
this.emp.useHandCursor = 0;

quindi il file xml è main.xml


FINE CODICE



La galleria poi richiama le immagini secondo questo codice:
onClipEvent (load)
{
if (_parent._parent.numLoadTitle == undefined)
{
_parent._parent.numLoadTitle = 0;
xmlNod = _root.xmlNodes.childNodes[0].childNodes[2].childNodes[_root.linkGallery].childNodes[_root.titleGallery];
AllxmlNode = xmlNod.childNodes[_parent._parent.numLoadTitle];
images = AllxmlNode.childNodes[1].firstChild.nodeValue;
var ifFolder = _root.xmlNodes.childNodes[0].childNodes[2].childNodes[_root.linkGallery].childNodes[_root.titleGallery].attributes.folder;
if (ifFolder == undefined)
{
loadMovie( images, cont.pic);
loadMovie( images, cont1.pic);
}
else if (ifFolder == "")
{
loadMovie( images, cont.pic);
loadMovie(images, cont1.pic);
}
else
{
loadMovie(ifFolder + images, cont.pic);
loadMovie(ifFolder + images, cont1.pic);
} // end else if
}
else
{
xmlNod = _root.xmlNodes.childNodes[0].childNodes[2].childNodes[_root.linkGallery].childNodes[_root.titleGallery];
AllxmlNode = xmlNod.childNodes[_parent._parent.numLoadTitle];
images = AllxmlNode.childNodes[1].firstChild.nodeValue;
var ifFolder = _root.xmlNodes.childNodes[0].childNodes[2].childNodes[_root.linkGallery].childNodes[_root.titleGallery].attributes.folder;
if (ifFolder == undefined)
{
loadMovie( images, cont.pic);
loadMovie( images, cont1.pic);
}
else if (ifFolder == "")
{
loadMovie( images, cont.pic);
loadMovie( images, cont1.pic);
}
else
{
loadMovie(ifFolder + images, cont.pic);
loadMovie(ifFolder + images, cont1.pic);
} // end else if
} // end else if
}

FINE CODICE

Tutto quello che vorrei fare è di aprire, per una seconda galleria, un altro file xml, tipo main2.xml. Purtroppo non riesco a farlo. Mi continua ad aprire il file main.xml anche per la seconda galleria. Per aprire i due file xml avevo pensato di modificare il codice in questo modo:


function onFinish(success_boolean, results_obj, xml)
{
if (success_boolean)
{
play ();
} // end if
} // End of the function
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.align = "MC";
Stage.scaleMode = "noScale";

this.cacheKiller = "true";
this.linkGallery = 0;
this.titleGallery = 0;
stop ();
var parsed_obj = {};
var unCash = new Date().getTime();
if (this.cacheKiller == "true")
{
fileToLoad = "main.xml?cacheKiller=" + unCash;
fileToLoad = "main.xml";
fileToLoad = "main2.xml?cacheKiller=" + unCash;
fileToLoad = "main2.xml";


}
else
{
fileToLoad = "main.xml";
fileToLoad = "main2.xml";

} // end else if
gs.dataTransfer.XMLParser.load(fileToLoad, onFinish, parsed_obj);
this.emp.useHandCursor = 0;

Ma come posso richiamare il file xml di main2.xml dalla galleria 2?

ciao Cibernow