oliver7
Messages postés102Date d'inscriptiondimanche 3 octobre 2004StatutMembreDernière intervention 8 septembre 2006
-
7 juin 2005 à 11:02
oliver7
Messages postés102Date d'inscriptiondimanche 3 octobre 2004StatutMembreDernière intervention 8 septembre 2006
-
7 juin 2005 à 18:00
slt,
voila mon xml :
<?xml version=\'1.0\' encoding=\'UTF-8\' ?>
et voila mon code flash :
stop();
monXml = new XML();
monXml.ignoreWhite = true;
monXml.onLoad = function(ok) {
if (ok) {
var noeud = monXml.firstChild;
var perso = noeud.childNodes;
for (var i = 0; i<lines.length; i++) {
this.newone(perso[i].attributes.COULEUR, perso[i].attributes.TOX, perso[i].attributes.TOY);
}
}
};
la fonction newone creer juste un personnage avec ces info.
et mon probleme c'est que sa marche pas !
J'ai cherché et j'ai pas trouvé.
oliver7
Messages postés102Date d'inscriptiondimanche 3 octobre 2004StatutMembreDernière intervention 8 septembre 2006 7 juin 2005 à 18:00
j'ai trouvé grace a un code de galerie photo avec xml
le code :
monXml = new XML();
monXml.load("dessin.xml");
monXml.ignoreWhite = true;
monXml.onLoad = function(ok) {
if (ok) {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
_root.newone(this.firstChild.childNodes[i].attributes.COULEUR, this.firstChild.childNodes[i].attributes.FROMX, this.firstChild.childNodes[i].attributes.FROMY, this.firstChild.childNodes[i].attributes.TOX, this.firstChild.childNodes[i].attributes.TOY);
}
}
};
et le xml :
<?xml version=\'1.0\' encoding=\'UTF-8\' ?>
<ROOT>