# Xml not loading images

**URL:** <https://forum.kirupa.com/t/xml-not-loading-images/52770>\
**Category:** Uncategorized\
**Created:** [May 27, 2004, 4:38am UTC](https://forum.kirupa.com/t/xml-not-loading-images/52770 "2004-05-27T04:38:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zebra\_1](https://avatars.discourse-cdn.com/v4/letter/z/71c47a/32.png) [@zebra\_1](https://forum.kirupa.com/u/zebra_1)\
**Post date:** [May 27, 2004, 4:38am UTC](https://forum.kirupa.com/t/xml-not-loading-images/52770/1 "2004-05-27T04:38:53Z")

</div>

Hallo!

to be short:  
my Kitchen.swf loads images and relative comments via an xml file. Everything it’s fine if I play it alone, but it won’t work if I load it in an other movie. I can only see the comment of the first image and a NaN error within the jpg preloader.Testing in flash reports an infinte “loading” message. I’ve tried without preloding too, but nothing to do.

I think it’s a _level_ question but I don’t know exatly where and how.  
I spent 2 days and nights fighting with it. :hangover:  
If someone could give me some hints I will appreciate very much!

[INDENT][SIZE=1]  
This is my flash hierarchy:

Intro

- Home
- 
  - Living …(here I have \_root.dummy.loadMovie(“files/Kitchen.swf”))

- 
  - 
    - Kitchen …(here I have \_root for everything: mc, buttons ect)

This is my folders hierarchy:

main …(Intro.swf)

- files …(all the other swf)
- 
  - stuff …(jpg, xml, txt etc)

- 
  - stuff2 … … …  
[/SIZE][/INDENT]  
And here is the xml AS:  
[FONT=Courier New]  
currentRecord = 0;  
[COLOR=DimGray]// Variable used to keep track of the current image  
// function for onLoad method of xmlObject[/COLOR]  
function dataLoaded(complete) {  
if (complete) {  
\_root.man\_mc.dynGo.removeAll();  
nodeCount = this.firstChild.childNodes.length;  
[COLOR=DimGray]// Check the image count from the xml file[/COLOR]  
showRecord(1);  
\_root.man\_mc.dynGo.rowCount = nodeCount;  
}  
}

[COLOR=DimGray]// XML declaration and loading[/COLOR]  
xmlObject = new XML();  
xmlObject.ignoreWhite = true;  
xmlObject.onLoad = dataLoaded;  
xmlObject.load(xmlSource);  
[COLOR=DimGray]// function to be run by “next” button[/COLOR]  
function showNext() {  
if (currentRecord == nodeCount) {  
loadNumber = 1;  
} else {  
loadNumber = currentRecord+1;  
}  
imgSlide();  
}  
[COLOR=DimGray]// function to be run by “previous” button[/COLOR]  
function showPrevious() {  
if (currentRecord == 1) {  
loadNumber = nodeCount;  
} else {  
loadNumber = currentRecord-1;  
}  
imgSlide();  
}

[COLOR=DimGray]// function to set variable names/display fields[/COLOR]  
function showRecord(recordNumber) {  
var nodeObject = xmlObject.firstChild.childNodes[recordNumber-1];  
didascalia = nodeObject.childNodes[0].childNodes[0].nodeValue;  
file = nodeObject.childNodes[1].childNodes[0].nodeValue;  
[COLOR=DimGray]// trace(file);[/COLOR]  
\_global.myTrigger = “”;  
slideFilename = “files/stuff/”+file+"";  
image\_mc.loadMovie(slideFilename);  
onEnterFrame = function () { bytesLoaded = \_root.image\_mc.getBytesLoaded();trace(\_global.myTrigger);if (\_global.myTrigger == “laoded”) {selectState();delete onEnterFrame;show();} else if (\_global.myTrigger == “laoding”) {image\_mc.\_alpha = 0;clearInterval(intervalID);}};  
currentRecord = recordNumber;  
\_root.man\_mc.dynGo.setSelectedIndex(currentRecord-1);  
}  
[/FONT]
