[COLOR=Red]Edit: By value i mean a number that is in my xml file.[/COLOR]
This is probably a very simple problem, but i’ve been working with this problem a few days now. I really suck at Actionscript, thats probably why.
Well, I want to retrieve a value from a xml file and put it into a variable outside the onLoad function. Somehow i can trace movieIds inside the onLoad function but not outside it.
Here is the code:
var playlist_xml = new XML();
playlist_xml.ignoreWhite = true;
playlist_xml.onLoad = function(success) {
if (success){
Ids = playlist_xml.firstChild.childNodes;
movieIds = Ids[0].firstChild.nodeValue;
}else trace(“Error loading XML file”); // no success? trace error (wont be seen on web)
trace(movieIds);
}
playlist_xml.load(“c://movieid.xml”);
TESTING_ID = movieIds; // Somehow movieIds never gets into var TESTING_ID
I hope you understand my problem.
Greetings.