package skins { import mx.skins.Border; public class VScrollArrow extends Border { private var thickness: Number = 15; override public function get measuredWidth():Number { return thickness;//ScrollBar.THICKNESS; } override public function get measuredHeight():Number { return thickness;//ScrollBar.THICKNESS; } private var backgroundColor: uint; private var borderColor: uint; private var arrowColor: uint; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); graphics.clear(); var lX: int = 5; var cX: int = lX + (unscaledWidth-lX)/2; var cY: int = unscaledHeight/2; borderColor = getStyle('borderColor'); backgroundColor = getStyle('fillColors')[0]; arrowColor = getStyle('arrColor'); var cols: Array = [0xFFFFFF, borderColor]; drawRoundRect(lX, 0, unscaledWidth - lX, unscaledHeight, 0, backgroundColor, 1); var isUp: Boolean = (name.indexOf('up') != -1); switch (name) { case "upArrowUpSkin": case "downArrowUpSkin": break; case "upArrowOverSkin": case "downArrowOverSkin": break; case "upArrowDownSkin": case "downArrowDownSkin": backgroundColor = getStyle('fillColors')[1]; cols = [cols[1], cols[0]]; break; default: break; } with (graphics) { beginFill(backgroundColor, 1); if (isUp) { lineStyle(1, cols[0], 1); moveTo(lX, unscaledHeight-1); lineTo(cX, 1); lineStyle(1, cols[1], 1); lineTo(unscaledWidth, unscaledHeight-1); lineTo(lX, unscaledHeight-1); } else { lineStyle(1, cols[0], 1); moveTo(unscaledWidth, 1); lineTo(lX, 1); lineTo(cX, unscaledHeight-1); lineStyle(1, cols[1], 1); lineTo(unscaledWidth, 1); } } } } }