# XML works in one FLA but not in other

**URL:** <https://forum.kirupa.com/t/xml-works-in-one-fla-but-not-in-other/165426>\
**Category:** flash\
**Created:** [October 11, 2005, 3:00am UTC](https://forum.kirupa.com/t/xml-works-in-one-fla-but-not-in-other/165426 "2005-10-11T03:00:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwopitz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jwopitz/32/1556_2.png) [@jwopitz](https://forum.kirupa.com/u/jwopitz)\
**Post date:** [October 11, 2005, 3:00am UTC](https://forum.kirupa.com/t/xml-works-in-one-fla-but-not-in-other/165426/1 "2005-10-11T03:00:49Z")

</div>

Hi, I am using XML to basically load menu items and then attach a a file when the menu item is pressed. I went through the tutorials on Kirupa. I am getting this error from one FLA and the other FLA works fine. I have attached some code and the sources for this.

Error opening URL “file:///E|/My%20Documents/WEB%20DESIGN/JUSTIN%20OPITZ/FLASH/CURRENT%20FLASH/Current/undefined”

This File Works Fine:  
var test\_xml:XML = new XML();  
test\_xml.ignoreWhite = true;  
test\_xml.onLoad = function(success) {  
if (success) {  
var rootNode:Object = test\_xml.firstChild;  
for (n = 0; n \< rootNode.childNodes.length; n++) {  
attachMovie(“empty\_mc”, “text\_mc” + n, n, {\_x:0, \_y:(n \* 400) - 400});  
\_root[“text\_mc” + n].text\_txt.text = rootNode.childNodes[n].childNodes[0].nodeValue;  
loadMovie(rootNode.childNodes[n].attributes.loc, \_root[“text\_mc” + n].holder\_mc);  
}  
}  
};

This File’s AS2.0 produces the error. What is the deal!!!

var menu\_style\_01:TextFormat = new TextFormat();  
with (menu\_style\_01) {  
size = 10;  
font = “Lucida Console”;  
color = 0x000000;  
align = “left”;  
bold = false;  
italic = false;  
}  
var test\_xml:XML = new XML();  
test\_xml.ignoreWhite = true;  
test\_xml.onLoad = function(success) {  
if (success) {  
var rootNode:Object = test\_xml.firstChild;  
var my\_mcl:MovieClipLoader = new MovieClipLoader();  
for (n = 0; n \< rootNode.childNodes.length; n++) {  
\_root.createEmptyMovieClip(“menu\_mc” + n, n);  
\_root[“menu\_mc” + n].\_y = n \* 15;  
\_root[“menu\_mc” + n].createTextField(“menu\_txt”, 10, 0, 0, 200, 15);  
\_root[“menu\_mc” + n].menu\_txt.text = rootNode.childNodes[n].firstChild.nodeValue;  
\_root[“menu\_mc” + n].menu\_txt.setTextFormat(menu\_style\_01);  
\_root[“menu\_mc” + n].onPress = function() {  
empty\_mc.loadMovie(rootNode.childNodes[n].attributes.loc);  
};  
}  
}  
};  
test\_xml.load(“test.xml”);

Thanks for any help
