Hi all,
i stucked in some problem.
I have an xml which looks like this
<gallerie naam="gallery1">
−
<gallery title="Some name" client="some client" intro="some intro.." cat="some category">
<image title="name 1">images/1.jpg</image>
<image title="name 2">images/2.jpg</image>
</gallery>
−
<gallerie naam="gallery2">
−
<gallery title="Some name2" client="some client2" intro="some intro..2" cat="some category"2>
<image title="name 3">images/variable3.jpg</image>
<image title="name 4">images/variable4.jpg.jpg</image>
</gallery>
</gallerie>
Because i have to use this format (because of cms), i can’t change a lot on it.
Now comes the reall problem: I want to load the first picture of every gallery. In this case
i have to load ‘images/1.jpg’ and ‘images/variable3.jpg’.
But i dont understand the construction of the xml for parsing it.
the actionscript part looks like this:
portfolio.onLoad = function()
{
var nodes:Array = [COLOR=Red]this.firstChild.childNodes[/COLOR];
for(var i=0;i<nodes.length;i++)
{
photo_thumbnail.push([COLOR=Red]nodes*.firstChild.childNodes.nodeValue[/COLOR]);
}
}
portfolio.load("test/portfolio.xml");
I have to change the red part. Who can help me?
[SIZE=1]*
For the ones who are curious how i would load the pictures.
It is in a for loop:
mcl.loadClip(photo_thumbnail*, this.firstPictureMC);*[/SIZE]
Thanks in advance!