# If xml loaded to this

**URL:** <https://forum.kirupa.com/t/if-xml-loaded-to-this/225093>\
**Category:** Uncategorized\
**Created:** [May 8, 2007, 7:38pm UTC](https://forum.kirupa.com/t/if-xml-loaded-to-this/225093 "2007-05-08T19:38:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magjac](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@magjac](https://forum.kirupa.com/u/magjac)\
**Post date:** [May 8, 2007, 7:38pm UTC](https://forum.kirupa.com/t/if-xml-loaded-to-this/225093/1 "2007-05-08T19:38:11Z")

</div>

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?

```auto

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

```
