# How to make the rollover? XML menu

**URL:** <https://forum.kirupa.com/t/how-to-make-the-rollover-xml-menu/171108>\
**Category:** flash\
**Created:** [December 1, 2005, 10:01pm UTC](https://forum.kirupa.com/t/how-to-make-the-rollover-xml-menu/171108 "2005-12-01T22:01:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icep](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@icep](https://forum.kirupa.com/u/icep)\
**Post date:** [December 1, 2005, 10:01pm UTC](https://forum.kirupa.com/t/how-to-make-the-rollover-xml-menu/171108/1 "2005-12-01T22:01:24Z")

</div>

Hi!

I was trying to make my menu and come this far [www.icep-design.com/hej](http://www.icep-design.com/hej) but run into problems. So i started all over and made it load from XML but i haven’t yet figure out a way to make my submenu. If u take a look at [www.icep-design.com/hej](http://www.icep-design.com/hej) and rollover the laserdome button you can see what im going after. I still have no idea how to make it. anybody that can help me?

I post my AS here:

stop ();  
import mx.transitions.Tween;  
import mx.transitions.easing. \*;  
//Making submeny invisible  
\_root.over\_mc.\_visible = false;  
//xml test  
menuXml = new XML;  
menuXml.ignoreWhite = true;  
menuXml.load (“menu\_new.xml”)  
menuXml.onLoad = function (success)  
{  
if (success)  
{  
menuItem = this.firstChild.childNodes;  
for (var i = 0; i \< menuItem.length; i ++)  
{  
item = _root ["button\_mc_" + i];  
item.upper\_text.text = menuItem \*.attributes.name;  
item.lower\_text.text = menuItem \*.attributes.lower;  
//text colors  
item.upper\_text.textColor = 0x969696;  
item.lower\_text.textColor = 0xBBBBBB;  
//function for submenus  
if (menuItem \*.nodeName == “menu”)  
{  
// open a submenu  
curr\_item.node\_xml = curr\_node;  
item.onRollOver = function ()  
{  
trace (“hej”)  
}  
}  
//rollOver colors  
item.onRollOver = function ()  
{  
//Colors of the text  
this.upper\_text.textColor = 0x000000;  
this.lower\_text.textColor = 0x000000;  
}  
//rollOut colors  
item.onRollOut = function ()  
{  
this.upper\_text.textColor = 0x969696;  
this.lower\_text.textColor = 0xBBBBBB;  
}  
//trace (this + " \>\> " + i + " : " + menuItem.length);  
}  
}  
}  
//rollOut remove movieclip on submenu  
\_root.over\_mc.onRollOut = function ()  
{  
\_root.over\_mc.\_visible = false;  
}

And here is my XML:

[http://www.icep-design.com/menu\_new.xml](http://www.icep-design.com/menu_new.xml)
