When i saw this post by Keith Peters i had the idea to turn this into a skin for the flex components.
The problem i found was that if you use a programmatic skin the manual tells you to extend the class mx.skins.ProgrammaticSkin.
This class extends from FlexShape which extends Shape. The problem is that in one skin i need to add more than one Shape but because ProgrammaticSkin is a Shape a can not add new shapes.
I ended up extending my skin from UIComponent which definetly is not the right way. If anyone knows a better way how to create a “complex” skin please comment here.
You can see what i came up with here. (Source enabled)