= lineHolder.height)
break;
}
var t2:Number = getTimer() - t1;
}
// Grid Updater
private function updateGrid():void
{
var count:Number = lineHolder.rawChildren.numChildren;
var cellWidth:Number = lineHolder.width / cols;
for (var i:int=0; i < count; i++)
{
var cell:DisplayObject = lineHolder.rawChildren.getChildAt(i);
cell = this[_refreshFunc](cell, sampleText, cellWidth);
}
}
// Column Resizer
private function resizeColumn():void
{
var secondaryColSize:int = (lineHolder.width - desiredColSize) / (cols-1);
var delta:Number = lineHolder.width - ((secondaryColSize * (cols - 1)) + desiredColSize);
var isFTE:Boolean = testTypeCombo.selectedLabel == "FTE";
var count:Number = lineHolder.rawChildren.numChildren;
var curColumn:int = 0;
var curX:int = 0;
var curY:int = 0;
var maxHeight:int = 0;
for (var i:int=0; i < count; i++)
{
var cellWidth:Number = (curColumn == 0) ? desiredColSize + delta : secondaryColSize;
var cell:DisplayObject = lineHolder.rawChildren.getChildAt(i);
cell = this[_refreshFunc](cell, null, cellWidth);
curColumn = curColumn + 1;
cell.x = curX;
cell.y = curY;
curX += cellWidth;
maxHeight = maxHeight < cell.height ? cell.height : maxHeight;
if (curColumn == cols)
{
curColumn = 0;
curX = 0;
curY += isFTE ? maxHeight + 7: maxHeight;
maxHeight = 0;
}
}
}
private function sliderChange():void
{
desiredColSize = slider.value;
resizeColumn();
}
private function reportResults():void
{
var totalTestTime:int = totalRenderTime + totalCreationTime;
flash.system.System.gc(); //mark
flash.system.System.gc(); //sweep
var memoryAllocated:Number = flash.system.System.totalMemory/1024;
var vellumType:String = "Vellum Build: " + flashx.textLayout.TextLayoutVersion.BUILD_NUMBER + "\n";
resultText = new Text();
resultText.text = "CreationTime (msecs): " + totalCreationTime.toString() + "\nRenderTime (msec): " + totalRenderTime.toString() + "\nTotalTime (msec): " + totalTestTime.toString()
+ " \nmem (K): " + memoryAllocated.toString() + "\n" + vellumType;
resultText.x = 80;
resultText.y = 140;
resultText.width = 400;
resultText.setStyle("fontFamily", "Verdana");
resultText.setStyle("fontSize", 18);
resultText.opaqueBackground = 0xFFFFFFFF;
lineHolder.addChild(resultText);
this.dispatchEvent(new Event(Event.COMPLETE));
}
]]>