What you're doing is correct--it's an unfortunate limit of our current inline CSS mechanism. For now, you'll have to create a new subclass to declare the new style metadata or you'll have to set the property using other (non-inline) CSS, like:
Ideally, the compiler wouldn't just look at the style metadata declared on the component, but it would also look at the style metadata declared on all Skins for that component as well. Or we could introduce a new inline CSS syntax, like:
<s:Button style="source: @Embed(...); skinClass: ClassReference(ImageButtonSkin)" />
Hopefully we will get to these enhancements soon, but probably not for Flex 4.0.
Good to know what I am doing is correct. I think the inline "style" attribute you proposed seems the most appealing, if not only for its congruency with xhtml.
Alternatively, since really what styles boil down to are just methods for parameterizing skins, it could be cool if there was something like the following:
<local:ImageButtonSkin source="@Embed(...);" />
Or maybe have the have the skin style attributes be defined in their own namespace, e.g.:
<s:Button myskin:source="@Embed(...);" />
That way the compiler wouldn't have to make 2 passes to guess at what skin is applied to the component, it would just have to lookup the skin implementation corresponding to the namespace.
Just randomly brainstorming, thanks for your response.