     {
         if (!flexContent)
             return;
-            
-        // Scale the flex content to the inverse of our nested scale
-        flexContent.scaleX = 1;
-        flexContent.scaleY = 1;
-        
-        // Size the flex content to our size
-        var contentWidth:Number = _width;
-        var contentHeight:Number = _height;
-        
-        if (flexContent.explicitWidth)
-            contentWidth = Math.min(contentWidth, flexContent.explicitWidth);
-        
-        if (flexContent.explicitHeight)
-            contentHeight = Math.min(contentHeight, flexContent.explicitHeight);
-            
-        flexContent.setActualSize(contentWidth, contentHeight);
+        
+        var myParent:ContainerMovieClip = ContainerMovieClip(parent);
+        var contentWidth:Number;
+        var contentHeight:Number;
+        
+        if (myParent.fillContentToSize)
+        {
+            // Size the flex content to our size
+            contentWidth = _width;
+            contentHeight = _height;
+            
+            if (flexContent.explicitWidth)
+                contentWidth = Math.min(contentWidth, flexContent.explicitWidth);
+            
+            if (flexContent.explicitHeight)
+                contentHeight = Math.min(contentHeight, flexContent.explicitHeight);
+                
+            flexContent.setActualSize(contentWidth, contentHeight);
+        }
+        else
+        {
+            // Size the flex content to what they want to be, 
+            // making sure we size them to their minimum size and 
+            // making sure we fit within this container.
+            // We don't do anything too fancy here for layout, like make sure 
+            // our size is large enough to hold our content in the first place
+            
+            contentWidth = Math.max(flexContent.minWidth, 
+                Math.min(_width, flexContent.getExplicitOrMeasuredWidth()));
+            contentHeight = Math.max(flexContent.minHeight, 
+                Math.min(_height, flexContent.getExplicitOrMeasuredHeight()));
+            
+            flexContent.setActualSize(contentWidth, contentHeight);
+        }
     }
 }
 }

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.display.MovieClip;
import flash.geom.Rectangle;
import flash.utils.getDefinitionByName;

import mx.core.IUIComponent;

                if (flexContent is uiComponentClass)
                {     
                    var child:Object = flexContent;
                    
                    // set the child's parent to this for now (when initializing styles,
                    // we'll have to do some funky business).
                    child.mx_internal::_parent = this;
                    
                    // Set the nestLevel of the child to be one greater
                    // than the nestLevel of this component.
