package skins { import mx.skins.Border; import mx.utils.ColorUtil; public class TabBar extends Border { private var backgroundColor: uint = 0xFFFFFF; private var borderColor: uint = 0; private var borderThickness: uint = 1; private var borderAlpha: Number = 1; private var backgroundAlpha: Number = 1; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.clear(); borderColor = getStyle('borderColor'); var cols: Array = [0xFFFFFF, borderColor]; backgroundColor = getStyle('downFillColors')[0]; graphics.clear(); drawRoundRect(0, 0, unscaledWidth, unscaledHeight, 0, backgroundColor, 1); var h: Number = unscaledHeight - 2; switch (name) { case 'selectedOverSkin': case 'selectedDownSkin': case 'selectedUpSkin': backgroundColor = ColorUtil.adjustBrightness(backgroundColor, 60); h = unscaledHeight; break; case 'overSkin': case 'downSkin': cols = cols.reverse(); break; default : break; } var radius: uint = 6; with (graphics) { beginFill(backgroundColor, 1); lineStyle(1, cols[0], 1); moveTo(0, unscaledHeight); lineTo(0, unscaledHeight - h + radius); curveTo(0, unscaledHeight - h, radius, unscaledHeight - h); lineTo(unscaledWidth - radius, unscaledHeight - h); curveTo(unscaledWidth, unscaledHeight - h, unscaledWidth, unscaledHeight - h + radius); lineStyle(1, cols[1], 1); lineTo(unscaledWidth, unscaledHeight); lineTo(1, unscaledHeight); endFill(); } } } }