 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.FlexEvent;
+import mx.events.FlexMouseEvent;
 import mx.events.ListEvent;
+import mx.events.MarshalMouseEvent;
 import mx.events.MenuEvent;
 import mx.managers.IFocusManagerContainer;
+import mx.managers.ISystemManager2;
 import mx.managers.PopUpManager;
 
 use namespace mx_internal;


            // Now that the menu is no longer visible, it doesn't need
            // to listen to mouseDown events anymore.
            systemManager.removeEventListener(MouseEvent.MOUSE_DOWN,
                                                   mouseDownOutsideHandler);

            // Fire an event
            var menuEvent:MenuEvent = new MenuEvent(MenuEvent.MENU_HIDE);

        supposedToLoseFocus = true;
        
        // If the user clicks outside the menu, then hide the menu
        var sbRoot:DisplayObject = ISystemManager2(systemManager).getSandboxRoot();
        sbRoot.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownOutsideHandler, false, 0, true);
        addEventListener(MarshalMouseEvent.MOUSE_DOWN, mouseDownOutsideHandler, false, 0, true);
    }

    /**
