Bonjour,
Mon problème est assez simple et je pense qu'il sera résolu en un minimum de temps. Je suis débutant en ActionScript. J'ai un xml des plus basique qui ressemble à celà :
...
<section>
<nom>Section 1</nom>
<couleur>00FF00</couleur>
<bordure>000000</bordure>
</section>
<section>
<nom>Section 2</nom>
<couleur>00FF00</couleur>
<bordure>000000</bordure>
</section>
...
Et voici mon code Actuel :
...
agora = new XML();
agora.ignoreWhite = true;
agora.load("Agora.xml");
agora.onLoad = function(flag) {
if (flag) {
x = agora.firstChild;
tab_sections = new Array();
for (i=0; x.childNodes[1].childNodes[i] != undefined; i++) {
tab_sections.push(x.childNodes[1].childNodes[i].childNodes[0].childNodes[0]);
trace(x.childNodes[1].childNodes[i].childNodes[0].childNodes[0])
for (j=0; x.childNodes[1].childNodes[i].childNodes[j] != undefined; j++) {
trace(x.childNodes[1].childNodes[i].childNodes[j].childNodes[0]);
}
trace("");
}
}
};
...
j'aimerai reussi a faire un tableau en 2D (array seulement, pas de datagrid) qui serait donc composer des sections et de leur contenu.
Si on devait le rendre visuel, ça pourrait donner celà:
section 1 section 2 section 3 ...
nom section 1 section 2 section 3
couleur 00ff00 00ff00 00ff00
bordure 000000 000000 000000
J'arrive déja a creer le premier tableau mais pas le second.
Je ne connais pas la synthaxe pour faire un tableau dans un tableau...
Please help.
Merci beaucoup.