package skins { import flash.display.GradientType; import flash.geom.Matrix; import mx.skins.Border; import mx.utils.ColorUtil; public class VScroll extends Border { override public function get measuredWidth():Number { return 15; } override public function get measuredHeight():Number { return 11; } private var colBorder: uint; private var colBackground: uint; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); graphics.clear(); unscaledWidth -= 1; colBorder = getStyle('borderColor'); switch (name) { case "thumbDownSkin": colBackground = ColorUtil.adjustBrightness(getStyle('fillColors')[0], 60); break; default: colBackground = getStyle('fillColors')[0]; break; } graphics.lineStyle(3, colBorder, 0.5); var matrix: Matrix = new Matrix(); matrix.createGradientBox(unscaledWidth, unscaledHeight, 0, 0, 0); var colAlt: uint = ColorUtil.adjustBrightness(colBackground, 90); drawRoundRect( 0, 0, unscaledWidth, unscaledHeight, 3, [colBackground, colAlt, colBackground], [1, 1, 1], matrix, GradientType.LINEAR, [0, 60, 190]); var size: Number = Math.min(unscaledHeight*0.3, 6); var cols: Array = [0xFFFFFF, colBackground]; with (graphics) { for (var i: int = 0; i< size; i++) { lineStyle(1, cols[i%2], 0.7); moveTo(3, unscaledHeight/2-size/2+i); lineTo(unscaledWidth-2, unscaledHeight/2-size/2+i); } } } } }