Hello!
I built a gallery using the tutorial on this site. xml flash gallery.
Now I have a problem. I’m trying to use multiple swf files(galleries) on a page.
Using the flashvars or querystring I’m passing data into flash file and then compare them to the id which I’ve added into my xml file. The whole thing looks like this:
<pic id="blackjack">
<image>images/fotka2.jpg</image>
<caption>bj</caption>
</pic>
this is the modified node in the xml file.
value=“prenos.swf?imgid=blackjack”
this is the added value in html file (it is in both param and object tag)
and here is the modified code:
for (i=0; i<total; i++) {
if (xmlNode.childNodes[2].attributes.id == _root.imgid) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
and a little piece down there when I load xml, to just random generate an xml file (i thought it could be a problem with caching, but it doesn’t look like that.
Why does only the first gallery work? multiple embeds does not load anything? have anyone of you came across hte problem and found a solution?
sorry for my bad english I hope you understand.
re, pincMX
for (i=0; i<total; i++) {
if (xmlNode.childNodes[2].attributes.id == _root.imgid) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}