문제

I'm new with Flex 4 skinning and have been following tutorials, developing some of my own skins, etc. I'm just wondering if there is a best practice for releasing a "skin library".

For example, say I just have 3 button skins I want to release. Do I compile a swc of just the 3 actual skin files, or do I make 3 buttons -- one using each skin -- and compile the swc of just these buttons? Or do you include both the skins and the buttons together?

도움이 되었습니까?

해결책

I would go with option 1 - one .swc with all the resources (maybe graphic files or .fxg files), custom ActionScript skin classes (if creating mobile skins), or .mxml skin files WITH NO CUSTOM Button classes.

It sounds like you're looking into creating custom Button classes whose difference amongst each other is only the skin they "wear". The fact that a Button's skin class can be set at instantiation (or declaratively in mxml, or in css) makes a good reason to keep the regular button and create only what is different - the skins.

You would only want to extend a control if you want to add to or modify its functionality, not the look.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top