I have defined two mxml skins for a button and I'd like to change skin during runtime, but I don't know how. This code doesn't work:
var skin:Class = PlayButtonSkin; //it's a PlayButtonSkin.mxml file
Nothing happens. No error, no skin change. The PlayButtonSkin.mxml file is defined as follows (plus headers):
<s:State name="up" />
<s:State name="over" />
<s:State name="down" />
<s:State name="disabled" />
where soundStop is a valid fxg file
You want to setup the skinClass not the skin property.
I changed the second line to this:
and still completely nothing happens.