Help! Animate Drop-Menu w/dif Colors?

Hi! I have already made my Drop-Menu horizontal from Senocular’s, similar to a previous postee, but I have also been trying to make buttons with different mouse-over and background colors. The submenus retain their colors, but I am having problems with the colors on the main menu, and have hit a wall. I would also like to animate the submenus with some sort of scroll effect – any help on this would be GREATLY appreciated!!

here are my source files, once again modified from Senocular’s:

GenerateMenu = function(container, name, x, y, depth, node_xml) {
var curr_node;
var curr_item;
var curr_menu = container.createEmptyMovieClip(name, depth);
for (var i=0; i<node_xml.childNodes.length; i++) {
curr_item = curr_menu.attachMovie(“itemClip”,“item”+i+"_mc", i);
curr_node = node_xml.childNodes*;
if(name == “mainmenu_mc”){
curr_item._x = icurr_item._width;
curr_item._y = y;
curr_item._x = x;
curr_item._y = y + i
curr_item.trackAsMenu = true;
curr_item.action = curr_node.attributes.action;
curr_item.variables = curr_node.attributes.variables;
curr_item.bgColor = curr_node.attributes.bgcolor;
curr_item.mouseColor = curr_node.attributes.mouse;
var col = new Color(curr_item.background);
col.setRGB(curr_item.bgColor); =;
if (node_xml.childNodes*.nodeName == “menu”){
curr_item.node_xml = curr_node;
curr_item.onRollOver = curr_item.onDragOver = function(){
var x = this._x;
var y = 19;
GenerateMenu(curr_menu, “submenu_mc”, x, y, 1000, this.node_xml);
curr_item.onRollOver = curr_item.onDragOver = function(){
var col = new Color(this.background);

curr_item.onRollOut = curr_item.onDragOut = function(){
var col = new Color(this.background);
curr_item.onRelease = function(){
Createmainmenu = function(x, y, depth, menu_xml){
GenerateMenu(this, “mainmenu_mc”, x, y, depth, menu_xml.firstChild);
mainmenu_mc.onMouseUp = function(){
if (mainmenu_mc.submenu_mc && !mainmenu_mc.hitTest(_root._xmouse, _root._ymouse, true)){
CloseSubmenus = function(){
Actions = Object();
Actions.gotoURL = function(urlVar){
getURL(urlVar, “_blank”);
Actions.newMenu = function(menuxml){
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok){
if (ok){
Createmainmenu(0, 0, 0, this);

As you can see, I tried to mess around more with the colors . . .


Source XML doc:

<?xml version=“1.0”?>
<menu name=“main”>
<item name=“home” action=“gotoURL” variables=“” bgcolor=“0x006635” mouse=“0x008C49”/>
<menu name=“about us” bgcolor=“0x006772”>
<item name=“overview” action=“gotoURL” variables=“” bgcolor=“0x006772” mouse=“0098A8”/>
<item name=“customer focus” action=“gotoURL” variables=“” bgcolor=“0x006772” mouse=“0x0098A8”/>
<item name=“quality systems” action=“gotoURL” variables=“” bgcolor=“0x006772” mouse=“0x0098A8”/>
<item name=“env. health safety” action=“gotoURL” variables=“” bgcolor=“0x006772” mouse=“0x0098A8”/>
<menu name=“solutions” bgcolor=“0x007EB0”>
<item name=“industries” action=“gotoURL” variables=“” bgcolor=“0x007EB0” mouse=“0x0099D6”/>
<item name=“services” action=“gotoURL” variables=“” bgcolor=“0x007EB0” mouse=“0x0099D6”/>
<item name=“products” action=“gotoURL” variables=“” bgcolor=“0x007EB0” mouse=“0x0099D6”/>
<item name=“locations” action=“gotoURL” variables=“” bgcolor=“0x0195E7” mouse=“0x3EB9FE”/>
<menu name=“corporate” bgcolor=“0x0099FF”>
<item name=“governance” action=“gotoURL” variables=“” bgcolor=“0x0099FF” mouse=“0x45B4FF”/>
<item name=“investor relations” action=“gotoURL” variables=“” bgcolor=“0x0099FF” mouse=“0x45B4FF”/>
<item name=“management” action=“gotoURL” variables=“” bgcolor=“0x0099FF” mouse=“0x45B4FF”/>
<menu name=“news” bgcolor=“0x0182E3”>
<item name=“press releases” action=“gotoURL” variables=“” bgcolor=“0x0182E3” mouse=“0x1C9DFE”/>
<item name=“data sheets” action=“gotoURL” variables=“” bgcolor=“0x0182E3” mouse=“0x1C9DFE”/>
<item name=“presentations” action=“gotoURL” variables=“” bgcolor=“0x0182E3” mouse=“0x1C9DFE”/>
<item name=“media center” action=“gotoURL” variables=“” bgcolor=“0x0182E3” mouse=“0x1C9DFE”/>
<item name=“trade shows” action=“gotoURL” variables=“” bgcolor=“0x0182E3” mouse=“0x1C9DFE”/>
<menu name=“contact us” action=“gotoURL” bgcolor=“0x1A5AB8”>
<item name=“careers” action=“gotoURL” variables=“” bgcolor=“0x1A5AB8” mouse=“0x377DE3”/>
<item name=“contacts” action=“gotoURL” variables=“” bgcolor=“0x1A5AB8” mouse=“0x377DE3”/>
<item name=“feedback” action=“gotoURL” variables=“” bgcolor=“0x1A5AB8” mouse=“0x377DE3”/>

bgcolor and mouse correspond to the two colors for each button . . . Help!