# XML load problem - FRUSTRATED

**URL:** <https://forum.kirupa.com/t/xml-load-problem-frustrated/184013>\
**Category:** flash\
**Created:** [March 31, 2006, 10:43pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013 "2006-03-31T22:43:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![calvintage](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@calvintage](https://forum.kirupa.com/u/calvintage)\
**Post date:** [March 31, 2006, 10:43pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013/1 "2006-03-31T22:43:27Z")

</div>

I have successfully created a few Flash files that use XML.

But, strangely, new files that I create cease to function with XMLs. My trace of the var xmlData returns nothing. NOTHING AT ALL!!!

Can someone kindly take a look at my FLA and XML files and see if there’s something I’m doing wrong? This is beyond frustrating since same code has worked before.

```auto
stop();
_global.main = this;
xmlData = new XML();
xmlData.ignoreWhite = true;
main.onEnterFrame = function() {
 if(xmlData.load("ad1.xml") && this.getBytesLoaded() >= this.getBytesTotal()) {
  trace("xml: "+xmlData);
  if(xmlData.getBytesLoaded() >= xmlData.getBytesTotal()) {
   delete onEnterFrame;
   main.gotoAndStop(2);
  }
 }
};

```

---

<div class="post-metadata">

**Author:** ![complete](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@complete](https://forum.kirupa.com/u/complete)\
**Post date:** [March 31, 2006, 10:45pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013/2 "2006-03-31T22:45:48Z")

</div>

I will give this a try.

Where is your FLA and XML?

---

<div class="post-metadata">

**Author:** ![calvintage](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@calvintage](https://forum.kirupa.com/u/calvintage)\
**Post date:** [March 31, 2006, 10:54pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013/3 "2006-03-31T22:54:09Z")

</div>

I have just uploaded the files. THanks complete.

---

<div class="post-metadata">

**Author:** ![therafiman](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@therafiman](https://forum.kirupa.com/u/therafiman)\
**Post date:** [March 31, 2006, 11:17pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013/4 "2006-03-31T23:17:03Z")

</div>

The boolean returned by the XML.load() function does not represent whether or not the file has been loaded, only if a parameter has been passed to it or not. So in this case, you are trying to read the XML file before it’s been loaded. Try:  
[COLOR=#0000FF]  
stop[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000] **\_global** [/COLOR].[COLOR=#000080]main[/COLOR] = [COLOR=#0000FF]this[/COLOR];  
xmlData = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]XML[/COLOR]COLOR=#000000[/COLOR];  
xmlData.[COLOR=#0000FF]ignoreWhite[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
xmlData.onLoad = function(success)  
{  
[INDENT]if(success) main.gotoAndStop(2);  
[/INDENT] }

---

<div class="post-metadata">

**Author:** ![calvintage](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@calvintage](https://forum.kirupa.com/u/calvintage)\
**Post date:** [March 31, 2006, 11:26pm UTC](https://forum.kirupa.com/t/xml-load-problem-frustrated/184013/5 "2006-03-31T23:26:48Z")

</div>

:beam: !!!OVATIONS!!! :krazy:

that solved it! thanks a bunch therafiman! u rox!
