Bonjour,

Je travaille sur un projet qui permet de créer un CD avec une base de données d'entreprises (Lister et rechercher).

Pour cela j'ai choisi de convertir ma base de données en fichier XML et l'intégrée dans un flash.

Comme je suis débutant, j'ai réussi à lister tout les données, mais j'arrive pas à trouver le code pour un bouton suivant et précédent qui me permet de naviguer dans les enregistrement et afficher un par un.


Voici mon code :


Fichier_XML = new XML();
Fichier_XML.ignoreWhite = true;
Fichier_XML.load("clim.xml");
Fichier_XML.onLoad = function(Reussite) {
if (Reussite) {
x = Fichier_XML.firstChild;
for(i = 0; x.childNodes[i] != undefined; i++) {
raison += + x.childNodes[i].childNodes[0].firstChild + "\n";
activite += "Secteur : " + x.childNodes[i].childNodes[1].firstChild + "\n";
adresse += "Adresse : " + x.childNodes[i].childNodes[2].firstChild;
adresse += " - " + x.childNodes[i].childNodes[3].firstChild + "\n";
fax += "Fax : " + x.childNodes[i].childNodes[5].firstChild + "\n";
nom += "Nom du contact : " + x.childNodes[i].childNodes[7].firstChild + "\n";
fonction += "fonction : " + x.childNodes[i].childNodes[8].firstChild + "\n";
num += "Téléphone personnel : " + x.childNodes[i].childNodes[9].firstChild + "\n";
email += "E-mail : " + x.childNodes[i].childNodes[10].firstChild + "\n";
}
total = "Il y a " + Fichier_XML.firstChild.childNodes.length + " entreprises.";
}
else { Voir_xml = "Erreur lors du chargement du fichier XML"; }
};