             if (!hitTestPoint(mouseEvent.stageX, mouseEvent.stageY, true))
                 close(event);
         }
-        else if (event is SandboxRootMouseEvent)
+        else if (event is SandboxMouseEvent)
             close(event);
     }
     

                                               dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.removeEventListener(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE,
                                               dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.removeEventListener(SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE,
                                            dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.removeEventListener(SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE,
                                            dropdownSwatch_mouseDownOutsideHandler);
                                               
            PopUpManager.removePopUp(dropdownSwatch);

                                            dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.addEventListener(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE,
                                            dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,
                                            dropdownSwatch_mouseDownOutsideHandler);
            dropdownSwatch.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE,
                                            dropdownSwatch_mouseDownOutsideHandler);

            dropdownSwatch.isOpening = true;
