Hi Folks I have some XML loading issues. My code works in Flash 6 AS 2 but not Flash 7.
Can anyone take a look at the included code and let me know what it is i am doing wrong.
I am developing on my localhost so i don’t think it should be a security issue.
The reason i want to use flash 7 is so that i can use the getNextHighestDepth() when attaching my movies.
Thanks,
Sean
*** Code ***
myXML = new XML();
init();
function init():Void {
trace(“load xml”);
loadXML(“http://sscott/appProperties.xml”, “processAppXML”);
}
function loadXML(xmlURL:String, functionName:String):Void{
myXML.ignoreWhite = true;
myXML.onload =myOnLoadHandler;
myXML.load( xmlURL );
}
function myOnLoadHandler(success){
if(success) {
trace(“file was loaded successfully”);
processAppXML(myXML);
}else{
trace(“Error - XML file could not be loaded properly”);
}
}
function processAppXML():Void {
_global.appVersion = myXML.firstChild.childNodes[0].firstChild.nodeValue;
_global.appName = myXML.firstChild.childNodes[1].firstChild.nodeValue;
_global.appLocation = myXML.firstChild.childNodes[3].firstChild.nodeValue;
trace(myXML.firstChild.childNodes[0].firstChild.nodeValue);
loadApp();
}