2010-06-22 48 views

回答

1

是的,我想回答我自己的問題。我想要做的是擴展TileLayout並覆蓋updateDisplayList(),但由於過度使用TileList中的私有不可能,所以我最終複製了整個TileList源並在updateDisplayList()中更改了幾行,例如:

var yPos:Number = unscaledHeight - visibleStartY - _rowHeight; 

yPos -= yMajorDelta; 

// Move along the minor axis 
if (++counter >= counterLimit) 
{ 
    counter = 0; 
    if (orientation == TileOrientation.ROWS) 
    { 
     xPos = 0; 
     yPos -= yMinorDelta; 
    } 
    else 
    { 
     xPos += xMinorDelta; 
     yPos = unscaledHeight - visibleStartY - _rowHeight; 
    } 
} 

一個黑客,排序的,但工作得很好滿足我的需求。