Bonjour,
Je souhaite faire une galerie photo, en passant par un fichier xml,
j'ai pris un modèle sur ce site :
J'ai créé un fichier : "content.xml" avec :
<?xml version='1.0' encoding='UTF-8'?>
<contenu>
<galerie>
...
</galerie>
</contenu>
Sur flash, j'ai:
MonXml = new XML();
MonXml.ignoreWhite = true;
MonXml.load("content.xml");
if (MonXml.loaded) {
_root.tml.gotoAndStop(5);
}
MovieClip.prototype.GetXMLcontent = function(lang) {
j = 23;
for (i=0; i<=j; i++) {
if (MonXml.firstChild.childNodes[i].attributes.id == lang) {
dat = MonXml.firstChild.childNodes[i].childNodes.toString();
this.content = dat;
}
}
};
ça ne marche pas, et je suis débutant, Pouvez vous m'aider? merci
Sources réduites :
http://Hansi07.free.fr/content.xml
http://Hansi07.free.fr/test.fla