# Load from one XML fed SWF to another

**URL:** <https://forum.kirupa.com/t/load-from-one-xml-fed-swf-to-another/47291>\
**Category:** flash\
**Created:** [April 2, 2004, 11:59am UTC](https://forum.kirupa.com/t/load-from-one-xml-fed-swf-to-another/47291 "2004-04-02T11:59:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![d60eba](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@d60eba](https://forum.kirupa.com/u/d60eba)\
**Post date:** [April 2, 2004, 11:59am UTC](https://forum.kirupa.com/t/load-from-one-xml-fed-swf-to-another/47291/1 "2004-04-02T11:59:46Z")

</div>

Hi all,

I have been reading with great interest many of the tutorials on this site. They are excellent; very clearly explained with good screen shots.

Having read the external SWF tutorial, and the XML fed menu tutorial I decided to have a go at creating two XML fed menus and loading from one to the other.

After a lot of flidding about, and learning, I managed to get it working - with only one slight catch - as soon as menu 1 is clicked it disappears! Have a look:  
[http://www.aciddrop.com/aciddrop\_site\_v2/index.html](http://www.aciddrop.com/aciddrop_site_v2/index.html)

This is the code for the first SWF (the code for the second is almost identical, just different x and y positionings):

```auto
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
  if (success) {
   menuItem = this.firstChild.childNodes;
   for (var i=0; i<menuItem.length; i++) {
	  item = _root.attachMovie("itemClipmain", "itemClipmain" + i, i);
	  item._x = 0;
	  item._y = 20*i;
	  item.itemLabelmain.text = menuItem*.attributes.name;
	  item.myUrl = menuItem*.attributes.url;
	  
   item.onRollOver = item.onDragOver = function(){
	var col = new Color(this.itemLabelmain);
	col.setRGB(0xff0000);
   }
  
  item.onRollOut = item.onDragOut = function(){
   var col = new Color(this.itemLabelmain);
   col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
  }
	
   item.onRelease = function() {
	  //getURL(this.myUrl,"_blank");
 _root.contents.loadMovie("secondary_nav.swf");
   }
  }
 }
}
menuXml.load("nav_1.xml");   

```

Has anyone encountered this before, and is there a simple fix? Or am I just approaching this in the wrong way?

Many thanks for any help!

Regards,

Leon
