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 colBackground: uint; private var colBorder: uint; private var colArrow: uint; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); graphics.clear(); colBorder= getStyle('borderColor'); colBackground = getStyle('fillColors')[0]; colArrow = getStyle('arrColor'); var isUp: Boolean = (name.indexOf('up') != -1); switch (name) { case "upArrowUpSkin": case "downArrowUpSkin": break; case "upArrowOverSkin": case "downArrowOverSkin": break; case "upArrowDownSkin": case "downArrowDownSkin": colBackground = getStyle('fillColors')[1]; break; default: break; } drawRoundRect(0,0,unscaledWidth, unscaledHeight, 0, colBackground, 1); with (graphics) { lineStyle(0, 0, 0); beginFill(colArrow); var cX: int = unscaledWidth/2; var cY: int = unscaledHeight/2; if (isUp) { moveTo(cX, cY - 2); lineTo(cX + 4, cY + 2); lineTo(cX - 4, cY + 2); lineTo(cX, cY - 2); } else { moveTo(cX + 4, cY - 2); lineTo(cX - 4, cY - 2); lineTo(cX, cY + 2); lineTo(cX + 4, cY - 2); } } } } }