 
 package weave.ui.controlBars
 {
+	import flash.display.DisplayObject;
 	import flash.geom.Point;
 	import flash.utils.setTimeout;
 	

	
	public class CustomMenuBar extends MenuBar
	{
		public function CustomMenuBar()
		{
			this.addEventListener(MenuEvent.MENU_SHOW, handleMenuShow);

		{
			super.updateDisplayList(unscaledWidth, unscaledHeight);
			
			// remove hard-coded margins
			for each (var item:DisplayObject in menuBarItems)
				item.x -= MARGIN_WIDTH;
			
			// fixes bug where old menu doesn't go away.
			// We can't call Menu.hide() because it will still affect the MenuBar
			// even though the MenuBar no longer manages the old Menu.
