package skins { import mx.skins.ProgrammaticSpriteSkin; import mx.utils.ColorUtil; public class avtSkin extends ProgrammaticSpriteSkin { override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.clear(); if (getStyle('customIcon')) { addChild(getStyle('customIcon')); } else { var cols : Array = getStyle('fillColors'); var borderColor : uint = getStyle('borderColor'); var padding: Number = unscaledHeight*0.15; var rad: Number = unscaledHeight*0.15; graphics.lineStyle(1, borderColor, 1); drawRoundRect(padding, padding, unscaledWidth-padding*2, unscaledHeight-padding*2, 0, ColorUtil.adjustBrightness(cols[0], 80), 1); with (graphics) { moveTo(unscaledWidth/2 - rad, unscaledHeight/2); lineTo(unscaledWidth/2 + rad, unscaledHeight/2); moveTo(unscaledWidth/2, unscaledHeight/2 - rad); lineTo(unscaledWidth/2, unscaledHeight/2 + rad); } } } } }