Bonjour,
J'ai créé un XML pour pouvoir m'en servir dans flash. Ca commmence à me
casser les bonbons puisque je ne sais pas pourquoi ça ne marche pas.
Mon xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<photos>
<Animaux en peluche>
<pict img="image2.jpg" titl="gratt" photograph="gerard" />
<pict img="image2.jpg" titl="gratt" photograph="gerard" />
<chatons>
<pict img="image8.jpg" titl="essai sousou categ"
photograph="Photograph bien" />
</chatons>
</Animaux en peluche>
<Avion bateaux>
<pict img="image1.jpg" titl="tour effeil" photograph="shaud7" />
<pict img="image3.jpg" titl="france" photograph="shaud7" />
<pict img="image7.jpg" titl="photographie waouw èè" photograph="chouett" />
</Avion bateaux>
<Civilisation precolombienne>
<pict img="image4.jpg" titl="bidule" photograph="Jean François le rat musqué" />
<pict img="image5.jpg" titl="machin chouette choze" photograph="jean paul" />
</Civilisation precolombienne>
</photos>
Mon AS :
_root.document=new XML(); //création de l'objet XML
_root.document.ignoreWhite=true;// les espaces vides sont supprimés
_root.document.load("mnu.xml");//chargement du document XML
_root.stop();
_root.document.onLoad=function(){ //quand le chargement du document est terminé , lancement de l'animation
trace(this.firstChild.childNodes[0].childNodes[0].attributes.photograph);
_root.play();
}
Réponse de la fenêtre de sortie : undefined
Keskikloch??? :??: