package skins { import flash.geom.Matrix; import mx.controls.scrollClasses.ScrollBar; import mx.skins.Border; import mx.utils.ColorUtil; public class VScrollTrack extends Border { private var backgroundColor: uint = 0xFFFFFF; private var backgroundColorAlt: uint = 0xFFFFFF; private var borderColor: uint = 0; private var borderThickness: uint = 1; private var borderAlpha: Number = 1; private var backgroundAlpha: Number = 1; private var isUp: Boolean = false; override public function get measuredWidth():Number { return ScrollBar.THICKNESS; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.clear(); borderColor = getStyle('borderColor'); backgroundColor = getStyle('fillColors')[0]; backgroundColorAlt = ColorUtil.adjustBrightness(backgroundColor, -90); graphics.lineStyle(0, 0, 0); drawRoundRect(0, 0, unscaledWidth, unscaledHeight, 0, ColorUtil.adjustBrightness(backgroundColor, 90), 1); var matrix: Matrix = new Matrix(); var thickness: Number = 4; matrix.createGradientBox(thickness, unscaledHeight - (unscaledWidth + 5)*2, 0, (unscaledWidth-thickness)/2, unscaledWidth + 5); drawRoundRect((unscaledWidth-thickness)/2, unscaledWidth + 5, thickness, unscaledHeight - (unscaledWidth + 5)*2, 0, [backgroundColorAlt, ColorUtil.adjustBrightness(backgroundColor, 50)], [1, 1], matrix); } } }