     protected var _dispatcher :IEventDispatcher;
     protected var _lefting :Boolean = false;
     protected var _upping :Boolean = false;
+    protected var _fitting :Rectangle = null;
 }
 }

    }

    /**
     * Actually pop up the menu. This can be used instead of show().
     */
    public function popUp (

        // if we've poped out of the boundaries, just snap it to the lower right corner, or upper
        // if upping, left if lefting
        if (submenu.x < fitting.left) {
            submenu.x = lefting ? fitting.left : Math.max(
                    fitting.right - submenu.getExplicitOrMeasuredWidth(), fitting.left);
        }
        if (submenu.y < fitting.top) {
            submenu.y = upping ? fitting.top : Math.max(
                    fitting.bottom - submenu.getExplicitOrMeasuredHeight(), fitting.top);
        }
    }
