XML load problem - FRUSTRATED

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.

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);
  }
 }
};

I will give this a try.

Where is your FLA and XML?

I have just uploaded the files. THanks complete.

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] }

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

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