If xml loaded to this

Hi,

I have this function where I want flash to check for some XML files before deciding which frame to goto.

This is what I have come up with but this stops at frame 3 even if there is no secondXML… Any Ideas?



firstXML.XML = new XML;
firstXML.load("first.xml");
firstXML.onLoad(success);

secondXML.XML = new XML;
secondXML.load("second.xml");
secondXML.onLoad(success);

this.onEnterFrame = function(){
	if(secondXML.onLoad == success){
		gotoAndStop(3);
		
	}
	else if(firstXML.onLoad == success){
		gotoAndStop(2);
	}
	
}