package skins.Aqua { import flash.display.GradientType; import flash.display.InterpolationMethod; import flash.display.SpreadMethod; import flash.geom.Matrix; import mx.skins.Border; public class VScroll extends Border { override public function get measuredWidth():Number { return 15; } override public function get measuredHeight():Number { return 11; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); graphics.clear(); var cols: Array = getStyle('fillColors'); var colTop: uint = cols[1]; var colMid: uint = cols[0]; var colBot: uint = 0xEEEEEE; var ratTop: uint = 0x00; var ratMid: uint = 0x55; var ratBot: uint = 0xFF; graphics.lineStyle(1, getStyle('borderColor'), 1); switch (name) { case "thumbDownSkin": if (getStyle('downFillColors')) { var colsDown: Array = getStyle('downFillColors'); colTop = colsDown[1]; colMid = colsDown[0]; colBot = 0xEEEEEE; } break; default: break; } var colors:Array = [ colTop, colMid, colBot]; var alphas:Array = [1, 1, 1]; var ratios:Array = [ratTop, ratMid, ratBot]; var matrix:Matrix = new Matrix(); matrix.createGradientBox(unscaledWidth, unscaledHeight, 0*Math.PI/180, 0, 0); graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix); var radius: uint = unscaledWidth; graphics.drawRoundRect(0, 0, unscaledWidth - 2, unscaledHeight, radius, radius); graphics.endFill(); var typeGlare:String = GradientType.RADIAL; var colorsGlare:Array = [0xFFFFFF, 0xFFFFFF, 0xFFFFFF]; var alphasGlare:Array = [0.4, 0.4, 0]; var ratiosGlare:Array = [0, 220, 255]; var spreadMethodGlare:String = SpreadMethod.PAD; var interpGlare:String = InterpolationMethod.LINEAR_RGB; var focalPtRatioGlare:Number = 0; var matrixGlare:Matrix = new Matrix(); var boxHeightGlare:Number = unscaledHeight*1.3; var boxWidthGlare:Number = unscaledWidth; var boxRotationGlare:Number = Math.PI/2; // 90˚ var txGlare:Number = -boxWidthGlare*0.5; var tyGlare:Number = -0.15*unscaledHeight; matrixGlare.createGradientBox(boxWidthGlare, boxHeightGlare, boxRotationGlare, txGlare, tyGlare); graphics.lineStyle(0, 0, 0); graphics.beginGradientFill(typeGlare, colorsGlare, alphasGlare, ratiosGlare, matrixGlare, spreadMethodGlare, interpGlare, focalPtRatioGlare); graphics.drawRoundRect(0, 0, unscaledWidth-2, unscaledHeight, radius, radius); graphics.endFill(); } } }