package skins { import mx.skins.Border; public class TabBar extends Border { private var colBackground: uint = 0xFFFFFF; private var colStrip: uint = 0x444444; private var padding: uint = 1; private var stripAlpha: Number = 0.3; private var borderThickness: uint = 1; private var borderAlpha: Number = 0.5; private var backgroundAlpha: Number = 0.9; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var radius : uint = 10; with (graphics) { clear(); lineStyle(0, 0, 0); switch (name) { case 'selectedOverSkin': case 'selectedDownSkin': case 'selectedUpSkin': stripAlpha = 0.1; break; default : stripAlpha = 0.4; break; } drawRoundRect(0, 0, unscaledWidth, unscaledHeight, 0, 0, 0); lineStyle(2, getStyle('borderColor'), stripAlpha); //right - left var sX: int, sY: int, eX: int, eY: int, next: int; var tmp: Number; sY = -unscaledWidth; while (sY < unscaledHeight) { next = sY + 7; sX = unscaledWidth; eX = 0; eY = sY + Math.abs(eX - sX); sX += Math.random()*2-1; sY += Math.random()*2-1; eX += Math.random()*2-1; eY += Math.random()*2-1; if (sY < 0) { tmp = 0 - sY; sY = 0; sX -= tmp; } if (eY > unscaledHeight) { tmp = eY - unscaledHeight; eY = unscaledHeight; eX += tmp; } graphics.moveTo(sX, sY); graphics.lineTo(eX, eY); sY = next; } graphics.lineStyle(2, colStrip, stripAlpha); graphics.moveTo(unscaledWidth - 1, 3); graphics.lineTo(unscaledWidth - 4, unscaledHeight - 4); } } } }