 			flexConsumed = 0; // space consumed by flexible compontents
 			done = true; // we are optimistic
 			
+            // We now do something a little tricky so that we can 
+            // support partial filling of the space. If our total
+            // percent < 100% then we can trim off some space.
+            // This unused space can be used to fulfill mins and maxes.
+            var unused:Number = spaceToDistribute -
+                                (spaceForChildren * totalPercent / 100);
+            if (unused > 0)
+                spaceToDistribute -= unused;
+            else
+                unused = 0;
+            
 			// Space for flexible children is the total amount of space
 			// available minus the amount of space consumed by non-flexible
 			// components.Divide that space in proportion to the percent

		} 
		while (!done);

		return Math.max(0, Math.floor(spaceToDistribute - flexConsumed))
	}
	
	/**

		var numChildren:int = childInfoArray.length;
		var flexConsumed:Number; // space consumed by flexible compontents
		var done:Boolean;
        
		// Continue as long as there are some remaining flexible children.
		// The "done" flag isn't strictly necessary, except that it catches
		// cases where round-off error causes totalPercent to not exactly
