Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

More Advanced Skinning

More Advanced Skinning

So far you have used a graphical symbol in the library to represent a specific skin. This approach is the simplest and provides a straightforward approach, but you should at least know of another option, one that enables you to write code to render a skin rather than a static graphical image.

In the default theme (Halo) that is provided with Flash, Macromedia makes extensive use of code to render a skin rather than static graphics in the library. So what are the benefits to this approach? The biggest benefit of using code to render a skin is the ability to have more control over how a skin resizes. Usually when you create custom skins for your own use, you know the target size and thus can easy build them. Macromedia, however, wanted to build skins that would scale well and render beautifully regardless of the size of the component.

Another benefit can be a more flexible method of skinning through manipulating the library. Take, for example, the Button component. It requires a skin for every state, and those skins need to match the size of the target size of the component when used or you will end up with disproportionate graphics. To deal with this you could either have a skin that is drawn through code, or actually have a skin that does some calculation and attaches multiple graphic symbols.

You’ve come a long way in exploring the various methods for skinning Flash components. Hopefully, you have a better understanding now of your options and can easily skin components within your application.