Container Flex


    
        
            
                import mx.core.UIComponent;
    
                private function removeFromLayout(event:MouseEvent):void
                {
                    (event.target as UIComponent).includeInLayout = false;
                    (event.target as UIComponent).startDrag();
                }
    
                private function reincludeInLayout(event:MouseEvent):void
                {
                    (event.target as UIComponent).stopDrag();
                    (event.target as UIComponent).includeInLayout = true;
                }