Senoc's drop-down menu....help

Hi ive followed Senoculars drop-down menu tute
http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm
, awsome stuff, but it seems the submenu’s dont disappear to well when you roll out. …They only disappear if you click on another menu item or when you click outside the menu.

Anyone got any fixes ?

I’m looking at where mindfriction states that the onRollout code isn’t working due to a typo. This is what I have…

[AS]CreateMainMenu = function(x, y, depth, menu_xml){
// generate a menu list
GenerateMenu(this, “mainmenu_mc”, x, y, depth, menu_xml.firstChild);
// close only submenus if visible durring a mouseup
// this main menu (mainmenu_mc) will remain
mainmenu_mc.onMouseUp = function(){
if (mainmenu_mc.submenu_mc && !mainmenu_mc.hitTest(_root._xmouse, _root._ymouse, true)){
CloseSubmenus();
}
};
};[/AS]
No typo there like he mentions. But my code only works when i click off the menu, or rollOver another menu item. Any one know why? I’m adding the onRollOut code as well.

[AS]curr_item.onRollOut = curr_item.onDragOut = function(){
// restore color
var col = new Color(this.background);
col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
};[/AS]

(edits)
Also while I’m asking for a lot might as well ask this. Is there a way to make the menu width dynamic based on the text input? My main links are one word, the sublinks as many as 3 and its just not pretty. I’ll attach my .fla if i can.

Thanks

Hey folks. Got a part of it done. The following AS will expand the textarea and the backround item by 30 pixles without distorting the text. In hindsight it would have taken someone like sen or lostinbeta about 2 seconds to do. I’m just glad I came up with the answer on my own!!

[AS]// movieclip for each menu item
curr_item = curr_menu.attachMovie(“menuitem”,“item”+i+"_mc", i);
if (name == “mainmenu_mc”) {
curr_item._x = x + i*(curr_item._width-1);
curr_item._y = y;
} else {
curr_item._x = x;
curr_item.background._width = curr_item._width + 30
curr_item.name._width = curr_item._width + 30
curr_item._y = y + i*(curr_item._height-1);
}
curr_item.trackAsMenu = true;
[/AS]

Still have the rollout problem if anyone wants to take a look at that.