Bonjour,
j'ai un peu cherché des solutions à mon problème dans le forum, mais ça fait trois heures que je trouve pas...
j'aimerai retrouver la valeur de la variable locale dans la globale, je ne sais pas si je me fais bien comprendre...
svp
Mon code est le suivant :
----------------------
import mx.xpath.XPathAPI;
//var idnom = _root.id;
var nom_personne = "";
myXML = new XML()
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
if(success){
/* definit le chemin*/
var chemin = "/table/personne[@id='" + idnom +"']";
// on récupère
var personNoeud_array = mx.xpath.XPathAPI.selectNodeList(this.firstChild,chemin);
nom_personne = personNoeud_array[0].firstChild.firstChild.nodeValue;
trace("Dans la fonction :" + nom_personne);
}
}
myXML.load("test.xml");
trace("Hors fonction :" + nom_personne);