# XML loads in Flash 6 AS 2 but not in Flash 7

**URL:** <https://forum.kirupa.com/t/xml-loads-in-flash-6-as-2-but-not-in-flash-7/108531>\
**Category:** Uncategorized\
**Created:** [April 26, 2004, 3:11pm UTC](https://forum.kirupa.com/t/xml-loads-in-flash-6-as-2-but-not-in-flash-7/108531 "2004-04-26T15:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obelisk](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@Obelisk](https://forum.kirupa.com/u/Obelisk)\
**Post date:** [April 26, 2004, 3:11pm UTC](https://forum.kirupa.com/t/xml-loads-in-flash-6-as-2-but-not-in-flash-7/108531/1 "2004-04-26T15:11:31Z")

</div>

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](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();

```

}
