I read the good tutorial here http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm and i would like to enhance it with gallery.
I think about it how to do it.
I need to load the description and images and movie and than with loop create next, and next.
I do’nt know how duplicate this movies.
I load the XML:
// fn after loading XML load
function loadXML_gal (loaded)
{
if (loaded)
{
xmlNode_gal = this.firstChild;
image_gal = [];
description_gal = [];
path_gal = [];
total = xmlNode_gal.childNodes.length;
for (i = 0; i < total; i++)
{
image_gal* = xmlNode_gal.childNodes*.childNodes[0].firstChild.nodeValue;
description_gal* = xmlNode_gal.childNodes*.childNodes[1].firstChild.nodeValue;
path_gal* = xmlNode_gal.childNodes*.childNodes[2].firstChild.nodeValue;
trace ("image_gal =" + image_gal*);
trace ("description_gal =" + description_gal*);
trace ("path_gal =" + path_gal*);
}
}
else
{
content = "file not loaded!";
}
}
// create XML object
xmlData_gal = new XML ();
xmlData_gal.ignoreWhite = true;
xmlData_gal.onLoad = loadXML_gal;
xmlData_gal.load ("xml/seznam_gallery.xml");
//
And now i need to put every loaded images in new movie.
XML what is loaded:
<?xml version="1.0" encoding="windows-1250"?>
<main_node>
<gallery>
<caption>Prvni galerie</caption>
<image>gallery/img_01.jpg</image>
<path>xml/gallery_01.xml</path>
</gallery>
<gallery>
<caption>Druha galerie</caption>
<image>gallery/img_02.jpg</image>
<path>xml/gallery_02.xml</path>
</gallery>
</main_node>
How to do it please? :*(