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!

Understanding the New Skinning Architecture

Understanding the New Skinning Architecture

It’s important to understand the way that component skins are used by components to help us deal with the available options. It would be ideal if the components only supported one method of skinning and that method is exactly what we wanted all the time. However, that is pretty tough to achieve without leaving out some users. I usually use the initObject method through code to skin components, as well as the sub-classing method, but that may not always work for your needs.

To begin, you must understand the basics of what ties everything together. In Flash, every component skin is identified by a Linkage ID in the library that the component code uses to attach a skin at runtime. That Linkage ID is a unique identifier that a component will use to identify a skin (which usually translates to a specific state).

For example in a Button component you have many states, each state can have its own skin, which the component will use. States can be any visual state the component has to represent, something like Rollover, Press, and RollOut. Knowing the available skin properties for each component is important. You can find this information in the documentation as well as look through the component code (in the code, they are declared as private member variables. In the component documentation section for each component, you will find a section titled “Customizing the [component name].” In that documentation entry you will find two main sections, one section is titled ” Using skins with the [component name].” That section will list the different skin properties (component properties) and provide a brief description of each one.

Note: I highly recommend you obtain the latest update to Flash MX 2004, version 7.2 (Ellipsis), which includes the most up-to-date documentation. The documentation for skinning each component has been updated and improved.