Hi, all, i have being trying to figure out this a whole afternoon trying everything i could before i wrote it here. If any of you could help me with this i would appreciate it a lot…
So here is what im trying to do, i have a function that returns a value right but for some reason i cant get it to do it right. Im getting “undefined” value instead of the value it should read from the xml.
path = "http://www.grupolefevre.com/web/aidc/";
function checkMsg(whatval):String {
var my_xml:XML = new XML();
var myReply_xml:XML = new XML();
myReply_xml.ignoreWhite = true;
my_xml.ignoreWhite = true;
myReply_xml.onLoad = function(success) {
if (success) {
theresult = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
trace(theresult);
}
};
my_xml.sendAndLoad(path+"obicomments.php?idpersona="+whatval,myReply_xml);
return theresult;
}
stop();
ys.text = checkMsg(24);
Thank you for your attention.
FCC