package skins { import mx.skins.ProgrammaticSkin; import mx.utils.ColorUtil; public class PrivateChatRestoreButtonSkin extends ProgrammaticSkin { private var padding: Number = 1; private var borderColor: uint; private var backgroundColor: uint; private var backgroundAlpha: Number = 0.7; private var backgroundColorAlt: uint; private var borderAlpha: Number = 0.7; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.clear(); borderColor = 0xFFFFFF;//ColorUtil.adjustBrightness(getStyle('borderColor'), -20); backgroundColor = getStyle('backgroundColor'); drawRoundRect(0, 0, unscaledWidth, unscaledHeight, 0, 0, 0); if (name.toLowerCase().indexOf('over') != -1) { backgroundAlpha = 1; borderAlpha = 1; } var mX: int, mY: int, mW: int = unscaledWidth * 0.6, mH: int = mW, radius: int = 2; with (graphics) { mX = mY = 4; lineStyle(1, borderColor, borderAlpha); beginFill(0xFFFFFF, backgroundAlpha); drawRoundRectComplex(mX, mY, mW, radius, radius, radius, 0, 0); endFill(); beginFill(backgroundColor, backgroundAlpha); drawRoundRectComplex(mX, mY + radius, mW, mH - radius, 0, 0, radius, radius); endFill(); mX = mY = unscaledWidth * 0.4; beginFill(0xFFFFFF, backgroundAlpha); drawRoundRectComplex(mX, mY, mW, radius, radius, radius, 0, 0); endFill(); beginFill(backgroundColor, backgroundAlpha); drawRoundRectComplex(mX, mY + radius, mW, mH - radius, 0, 0, radius, radius); endFill(); } } } }