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 borderColor: uint; private var backgroundColor: uint; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); graphics.clear(); unscaledWidth -= 1; borderColor = getStyle('borderColor'); switch (name) { case "thumbDownSkin": backgroundColor = ColorUtil.adjustBrightness(getStyle('fillColors')[0], 60); break; default: backgroundColor = getStyle('fillColors')[0]; break; } graphics.lineStyle(1, borderColor, 1); var matrix: Matrix = new Matrix(); matrix.createGradientBox(unscaledWidth, unscaledHeight, 0, 0, 0); drawRoundRect( 0, 0, unscaledWidth, unscaledHeight, 5, [0xFFFFFF, backgroundColor], [0.8, 1], matrix, GradientType.LINEAR, [0, 170]); var size: Number = Math.min(unscaledHeight*0.3, 8); var cols: Array = [0xFFFFFF, backgroundColor]; 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); } } } } }