When using skin's, I've been following the "Creating custom skin properties" ( http://www.adobe.com/devnet/flex/videotraining/flex4beta/xml/fiaw_v3_10.html ) video from Flex 4 beta in a week series. This is great - and I can set the property I want no problem - but what I would like to do is change the alpha of one of the skin's shapes depending on the state of the host component. I'm not sure how I can do that - is there a 'how to' or demo of this available?
To give an example use case, I've subclassed the VScrollBar control and have moved the scrollbar components around in the skin. What I would like to try and do, to see how it can be done, is to change the alpha on only the track, depending on the state of the host component.
I've found that the answer lies in making use of skin states. Basically what I did was to override the getCurrentSkinState() property for my component, and appended a custom string to create my custom states. Then in combination with SkinState metadata in the component and states in the skin I was able to do what I was looking for.
A much better explanation and examples can be found here: http://saturnboy.com/2009/09/flex4-component-states-skin-states/ - which I found immensely helpful.