         {
             switch(popUpPosition)
             {
-                case RelativePosition.BELOW :
+                case PopUpPosition.BELOW :
                     if (popUpBounds.bottom > screen.bottom)
-                        adjustedPosition = RelativePosition.ABOVE; 
+                        adjustedPosition = PopUpPosition.ABOVE; 
                     break;
-                case RelativePosition.ABOVE :
+                case PopUpPosition.ABOVE :
                     if (popUpBounds.top < screen.top)
-                        adjustedPosition = RelativePosition.BELOW; 
+                        adjustedPosition = PopUpPosition.BELOW; 
                     break;
-                case RelativePosition.LEFT :
+                case PopUpPosition.LEFT :
                     if (popUpBounds.left < screen.left)
-                        adjustedPosition = RelativePosition.RIGHT; 
+                        adjustedPosition = PopUpPosition.RIGHT; 
                     break;
-                case RelativePosition.RIGHT :
+                case PopUpPosition.RIGHT :
                     if (popUpBounds.right > screen.right)
-                        adjustedPosition = RelativePosition.LEFT; 
+                        adjustedPosition = PopUpPosition.LEFT; 
                     break;
             }
         }

    {
        switch(placement)
        {
            case RelativePosition.BELOW:
                registrationPoint.x = 0;
                registrationPoint.y = unscaledHeight;
                break;
            case RelativePosition.ABOVE:
                registrationPoint.x = 0;
                registrationPoint.y = -popUpHeight;
                break;
            case RelativePosition.LEFT:
                registrationPoint.x = -popUpWidth;
                registrationPoint.y = 0;
                break;
            case RelativePosition.RIGHT:
                registrationPoint.x = unscaledWidth;
                registrationPoint.y = 0;
                break;            
            case RelativePosition.CENTER:
                registrationPoint.x = (unscaledWidth - popUpWidth) / 2;
                registrationPoint.y = (unscaledHeight - popUpHeight) / 2;
                break;            
            case RelativePosition.EXACT:
                // already 0,0
                break;
        }

    private var popUpIsDisplayed:Boolean = false;
    private var addedToStage:Boolean = false;
    
    private static var decomposition:Vector.<Number> = new <Number>[0,0,0,0,0];
    
    //--------------------------------------------------------------------------
    //
