             return;
         
         // TODO EGeorgie: use vector
-        var layoutItemArray:Array = new Array();
         var layoutItem:ILayoutItem;
         var count:uint = layoutTarget.numLayoutItems;
-        var totalCount:uint = count; // How many items will be laid out
-        for (var i:int = 0; i < count; i++)
-        {
-            layoutItem = layoutTarget.getLayoutItemAt(i);
-            if (!layoutItem || !layoutItem.includeInLayout)
+        
+        // if verticalAlign is "contentJustify", we need to figure out contentHeight.
+        // contentHeight gets sent in to distributeWidth(), but is only used if 
+        // verticalAlign is "justify" (contentHeight is unscaledHeight) or 
+        // verticalAlign is "contentJustify" (contentHeight is the maximum height
+        // of all its children and a minimum of unscaledHeight)
+        var contentHeight:Number = unscaledHeight;
+        
+        if (verticalAlign != VerticalAlign.TOP)
+        {
+            for (var i:int = 0; i < count; i++)
             {
-            	totalCount--;
-                continue;
-            } 
-            layoutItemArray.push(layoutItem);
-        }
-
-        var totalWidthToDistribute:Number = unscaledWidth;
-        if (totalCount > 1)
-            totalWidthToDistribute -= (totalCount - 1) * gap;
-
-        distributeWidth(layoutItemArray, totalWidthToDistribute, unscaledHeight); 
-                            
-        // TODO EGeorgie: verticalAlign
+                layoutItem = layoutTarget.getLayoutItemAt(i);
+                if (!layoutItem || !layoutItem.includeInLayout)
+                    continue;
+                
+                var layoutItemHeight:Number;
+                if (hasPercentHeight(layoutItem))
+                    layoutItemHeight = calculatePercentHeight(layoutItem, unscaledHeight);
+                else
+                    layoutItemHeight = layoutItem.preferredSize.y;
+                    
+                contentHeight = Math.max(contentHeight, layoutItemHeight);
+            }
+        }
+
+        distributeWidth(unscaledWidth, unscaledHeight, contentHeight); 
+        
+        // default to top (0)
         var vAlign:Number = 0;
+        if (verticalAlign == VerticalAlign.MIDDLE)
+            vAlign = .5;
+        else if (verticalAlign == VerticalAlign.BOTTOM)
+            vAlign = 1;
         
         // If columnCount wasn't set, then as the LayoutItems are positioned
         // we'll count how many columns fall within the layoutTarget's scrollRect

            }
            else
            {
                newHeight = NaN;
                if (hasPercentHeight(layoutItem))
                   newHeight = calculatePercentHeight(layoutItem, height);
                
                layoutItem.setActualSize(NaN, newHeight);
                spaceToDistribute -= layoutItem.actualSize.x;
            } 
        }

        // Distribute the extra space among the flexible children
        if (totalPercentWidth)

    public function get lastIndexInView():int
    {
        return _lastIndexInView;
    }
    
    //----------------------------------
    //  verticalAlign
    //----------------------------------

    /**
     *  @private
     */
    private var _verticalAlign:String = VerticalAlign.TOP;

    [Inspectable(category="General")]

    /** Horizontal alignment of children in the container.
     *  Possible values are <code>"top"</code>, <code>"middle"</code>,
     *  <code>"bottom"</code>, <code>"justify"</code>, 
     *  and <code>"contentJustify"</code>.
     *  The default value is <code>"top"</code>, but some containers,
     *  such as List, use a different default value.  There are constants 
     *  for these values in <code>mx.layout.VerticalAlign</code>.
     */
    public function get verticalAlign():String
    {
        return _verticalAlign;
    }

    /**
     *  @private
     */
    public function set verticalAlign(value:String):void
    {
        if (value == _verticalAlign) 
            return;
        
        _verticalAlign = value;
        invalidateTargetDisplayList();
    }

    /**
