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
This is the code for the first SWF (the code for the second is almost identical, just different x and y positionings):
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