Home > Articles > Web Development

  • Print
  • + Share This
This chapter is from the book

Themes

A theme is essentially a look, generally a visually consistent one, for a Flex application that has been created using CSS and/or supporting assets. A theme can vary in complexity from simple color changes to graphic-rich styling. After spending the time and effort to create a theme for your Flex application, you can package it to be repurposed or distributed by creating a theme.

At a minimum, a theme can be used by passing its assets to others interested in implementing it into their Flex application. You can also package those assets as a single theme within a Flash Component file (SWC) to be easily distributed or compile that theme SWC to be used as a theme loaded at runtime. However, once you create a theme SWC, it will no longer be editable.

A theme SWC is basically a package of any CSS files, graphic assets, or programmatic skin classes that comprise your Flex application's appearance. Each of the supporting graphical assets or classes must be either embedded or use a ClassReference in order to ensure their inclusion into the theme SWC. You can learn more about embedding graphic assets in the Skinning chapter. You can use the Flex compiler to apply a theme SWC and the compc utility to create one. To learn more about working with theme SWCs, refer to the Flex 3 documentation.

  • + Share This
  • 🔖 Save To Your Account