Salut,
voici une solution :
//EN SUPPOSANT QUE TU SOIS DANS LE _ROOT
var xmlLoader = new XML();
xmlLoader.ignoreWhite = true;
xmlLoader.onLoad = function( succes :Boolean ) :Void {
if ( succes ) {
i = -1;
// les 2 lignes de codes suivantes sont les même (ici this fait référence à l'objet xmlLoader)
max = this.firstChild.childNodes.length;
///max = xmlLoader.firstChild.childNodes.length;
}
else {
trace( "erreur chargement XML" );
}
}
function chargerXML() :Void {
// toujours appeler la fonction load() après la définition de la fonction événementielle onLoad()
charge.load( "archi.xml" );
}
//code de ton bouton (qu'il soit de type Button ou MovieClip)
monBouton.onPress = function () :Void {
chargerXML();
}
bali_balo....=]