 package mx.controls
 {
 
+import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;

            dropdownSwatch.showTextField = showTextField;
            dropdownSwatch.selectedColor = selectedColor;
            dropdownSwatch.owner = this;
            point = dropdownSwatch.parent.globalToLocal(point);

            // Position: top or bottom
            var yOffset:Number = point.y;
            var sm:ISystemManager = systemManager;         
            if (point.y + dropdownSwatch.height > sm.screen.height && point.y > (height + dropdownSwatch.height)) // Up
            {
                // Dropdown opens up instead of down
                yOffset -= dropdownGap + dropdownSwatch.height;
                initY = -dropdownSwatch.height/scaleY;
                dropdownSwatch.tweenUp = true;
            }
            else // Down
            {
                yOffset += dropdownGap + height;
                initY = dropdownSwatch.height/scaleY;
                dropdownSwatch.tweenUp = false;
            }

            // Position: left or right
            var xOffset:Number = point.x;
            if (point.x + dropdownSwatch.width > sm.screen.width && point.x > (width + dropdownSwatch.width))
            {
                // Dropdown appears to the left instead of right
                xOffset -= (dropdownSwatch.width - width);
            }

            // Position the dropdown
            dropdownSwatch.move(xOffset, yOffset);

            //dropdownSwatch.setFocus();


import mx.events.DropdownEvent;
import mx.events.FlexEvent;
import mx.events.FlexMouseEvent;
import mx.events.InterManagerRequest;
import mx.events.SandboxMouseEvent;
import mx.managers.IFocusManager;
import mx.managers.ISystemManager;
