# XML Menu & Rollover

**URL:** <https://forum.kirupa.com/t/xml-menu-rollover/78030>\
**Category:** flash\
**Created:** [February 1, 2005, 4:43pm UTC](https://forum.kirupa.com/t/xml-menu-rollover/78030 "2005-02-01T16:43:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeftyDrizzel](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@LeftyDrizzel](https://forum.kirupa.com/u/LeftyDrizzel)\
**Post date:** [February 1, 2005, 4:43pm UTC](https://forum.kirupa.com/t/xml-menu-rollover/78030/1 "2005-02-01T16:43:23Z")

</div>

I followed this tut:  
[http://www.kirupa.com/developer/actionscript/xml\_dropdown\_menu.htm](http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm)

…and customized for my own needs (horizontal as opposed to vertical menu)

However, I need the rollover to change to another movieclip - as opposed to a background color.

I know the instruction is located somewhere within this chunk of code:

[color=silver]// item submenu behavior for rollover event[/color]  
if (node\_xml.childNodes\*.nodeName == “menu”){  
// open a submenu  
curr\_item.node\_xml = curr\_node;  
curr\_item.onRollOver = curr\_item.onDragOver = function(){  
GenerateMenu(curr\_menu, this.node\_xml);  
[color=silver]// show a hover color[/color]  
[color=red] var col = new Color(this.background);  
col.setRGB(0xf4faff);  
[/color] };  
}else{ // nodeName == “item”  
curr\_item.arrow.\_visible = false;  
[color=silver]// close existing submenu[/color]  
curr\_item.onRollOver = curr\_item.onDragOver = function(){  
curr\_menu.submenu\_mc.removeMovieClip();  
[color=silver]// show a hover color[/color]  
[color=red] var col = new Color(this.background);  
col.setRGB(0xf4faff);  
[/color] };  
}

Yet have no idea how to write the code to tell Flash to replace with a movie clip as opposed to simply changing the color?

My file is located here (in case it helps any to decipher where I am stuck):  
[http://www.andyford.com/xmlmenu/xmlmenu.zip](http://www.andyford.com/xmlmenu/xmlmenu.zip)

Thanks in advance!

“Lefty”
