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 backgroundColorAlt: uint; private var borderAlpha: Number = 0.6; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { borderColor = ColorUtil.adjustBrightness(getStyle('borderColor'), -20); backgroundColor = getStyle('backgroundColor'); if (name.toLowerCase().indexOf('over') != -1) { borderAlpha = 1; } backgroundColorAlt = ColorUtil.adjustBrightness(backgroundColor, 90); graphics.lineStyle(0, 0, 0); drawRoundRect(0, 0, unscaledWidth, unscaledHeight, 0, 0, 0); with (graphics) { lineStyle(3, borderColor, borderAlpha); moveTo(padding, padding + 1); lineTo(unscaledWidth-padding, padding); lineStyle(2, borderColor, borderAlpha); moveTo(unscaledWidth-padding, padding + 2); lineTo(unscaledWidth-padding-2, unscaledHeight - padding -1); lineTo(padding, unscaledHeight - padding); lineTo(padding - 1, padding+2); //small rect inside padding = unscaledWidth*0.3; lineStyle(2, borderColor, borderAlpha); moveTo(padding, padding + 1); lineTo(unscaledWidth-padding - 1, padding); lineStyle(1, borderColor, borderAlpha); moveTo(unscaledWidth-padding, padding + 3); lineTo(unscaledWidth-padding-2, unscaledHeight - padding -1); lineTo(padding, unscaledHeight - padding); lineTo(padding - 1, padding+2); } } } }