Skinning a flex button can often take multiple graphics and/or MXML files for each state. Here’s how to skin a button using MXML and Degrafa to handle three button states with just one file (plus a bonus ‘glow’ filter as an alternate way to get a drop shadow).
The secret is to override the updateDisplayList method and use the skin’s current name in a switch statement to apply different Degrafa strokes and fills to the button. Click to view an example with source.
<![CDATA[]]>
<!-- FILLS -->
<!-- UP -->
<!-- OVER -->
<!-- DOWN -->
<!-- STROKES -->
<!-- UP -->
<!-- OVER -->
<!-- DOWN -->
<!-- GEOMETRY -->

