         if (!layoutTarget)
             return;
 
-        updateActualValues(unscaledWidth, unscaledHeight);
-
-        var xPos:Number = 0;
-        var yPos:Number = 0;
+        calculateDisplayParameters(unscaledWidth, unscaledHeight);
+        
+        // Upper right hand corner of first (visibleStartIndex) tile/cell
+        var xPos:Number = visibleStartX;  // 0 if useVirtualLayout=false
+        var yPos:Number = visibleStartY;  // ...
+                
+        // Use MajorDelta when moving along the major axis
+        var xMajorDelta:Number;
+        var yMajorDelta:Number;
+
+        // Use MinorDelta when moving along the minor axis
+        var xMinorDelta:Number;
+        var yMinorDelta:Number;
 
         // Use counter and counterLimit to track when to move along the minor axis
         var counter:int = 0;
         var counterLimit:int;
-
-        // Use MajorDelta when moving along the major axis
-        var xMajorDelta:Number;
-        var yMajorDelta:Number;
-
-        // Use MinorDelta when moving along the minor axis
-        var xMinorDelta:Number;
-        var yMinorDelta:Number;
 
         // Setup counterLimit and deltas based on orientation
         if (orientation == TileOrientation.ROWS)

            yMinorDelta = 0;
        }

        var count:int = layoutTarget.numElements;
        for (var i:int = 0; i < count; i++)
        {
            var el:ILayoutElement = layoutTarget.getElementAt(i);
            if (!el || !el.includeInLayout)
                continue;



        return _numElementsCached;
    }
    
    /**
     *  @private
     *  This method computes values for visibleStartX,Y, visibleStartIndex, and 
     *  visibleEndIndex based on the TileLayout geometry values, like _columnWidth
     *  and _rowHeight, computed by calculateActualValues().
     * 
     *  If useVirtualLayout=false, then visibleStartX,Y=0 and visibleStartIndex=0
     *  and visibleEndIndex=layoutTarget.numElements-1.
     * 
     *  If useVirtualLayout=true and orientation=ROWS then visibleStartIndex is the 
     *  layout element index of the item at first visible row relative to the scrollRect, 
     *  column 0.  Note that we're using column=0 instead of the first visible column
     *  to simplify the iteration logic in updateDisplayList().  This is optimal 
     *  for the common case where the entire row is visible.   Optimally handling 
     *  the case where orientation=ROWS and each row is only partially visible is 
     *  doable but adds some complexity to the main loop.
     * 
     *  The logic for useVirtualLayout=true and orientation=COLS is similar.
     */
    private function calculateDisplayParameters(unscaledWidth:int, unscaledHeight:int):void
    {
        updateActualValues(unscaledWidth, unscaledHeight);

        var layoutTarget:GroupBase = target;
        var eltCount:int = layoutTarget.numElements;
        visibleStartX = 0;   // initial values for xPos,yPos in updateDisplayList
        visibleStartY = 0;
        visibleStartIndex = 0;
        visibleEndIndex = eltCount - 1;

        if (useVirtualLayout)
        {
            var hsp:Number = layoutTarget.horizontalScrollPosition;
            var vsp:Number = layoutTarget.verticalScrollPosition;
            var cwg:Number = _columnWidth + _horizontalGap;
            var rwg:Number = _rowHeight + _verticalGap;
            
            var visibleCol0:int = Math.floor(hsp / cwg);
            var visibleRow0:int = Math.floor(vsp / rwg);
            var visibleCol1:int = Math.min(_columnCount - 1, Math.floor((hsp + unscaledWidth) / cwg));
            var visibleRow1:int = Math.min(_rowCount - 1, Math.floor((vsp + unscaledHeight) / rwg));

            if (orientation == TileOrientation.ROWS)
            {
                visibleStartIndex = (visibleRow0 * _columnCount);
                visibleEndIndex = Math.min(eltCount - 1, (visibleRow1 * _columnCount) + visibleCol1); 
                visibleStartY = visibleRow0 * rwg;                
            }
            else
            {
                visibleStartIndex = (visibleCol0 * _rowCount);
                visibleEndIndex = Math.min(eltCount - 1, (visibleCol1 * _rowCount) + visibleRow1);
                visibleStartX = visibleCol0 * cwg;                
            }
        }
    }    

    /**
     *  Sets the size and the position of the specified layout element and cell bounds.
