Accessibility
Chafic Kazoun

Chafic Kazoun

atellis.com
rewindlife.com

Table of Contents

Created:
19 July 2004
Modified:
12 September 2005
User Level:
Intermediate
Products:
Flash

Skinning the Flash 8 Components

Flash components received a major upgrade in Flash MX 2004. One of the areas that received a facelift is the skinning mechanism. Flash 8 introduces some changes to the workflow in the authoring environment and references to paths. If you have read the earlier version of this article on skinning the Flash MX 2004 component, this article will seem very familiar because I upgraded it to reflect the changes in Flash 8.

In this article, I cover skinning using the library and themes, and through code I explore skinning using the prototype method, subclassing a component class, and the initObject method. Armed with this knowledge, you will be able to take better control of your application's look and feel and have a good understanding of how flexible the skinning architecture is in Flash 8.

Requirements

To make the most of this tutorial you need the following software and files:

Macromedia Flash 8 Basic

or Macromedia Flash Professional 8

Tutorials and sample files:

Prerequisite Knowledge

Basic knowledge of Flash components and ActionScript.

What's Different in Flash 8?

Although the architecture and approach to skinning has not changed since Flash MX 2004, some minor changes are important to mention for those already familiar with skinning components in Flash MX 2004.

The following has changed since Flash MX 2004:

  • Flash 8 introduces the new FLVPlayback components. These components do not use the Version 2.0 component architecture. Hence, the way you approach skinning them is different from the standard user interface components that come with Flash 8. They will not be covered in this article. For more details, see Dan Carr's article, Customizing the FLVPlayback Component.
  • The location of some of the paths where you find FLA files and ActionScript classes provided by Macromedia has changed slightly. You can find the component FLA files now at the following locations:

    • (Windows) C:\Program Files\Macromedia\Flash 8\<language>\Configuration\ComponentFLA
    • (Macintosh) Hard Drive/Users/<username>/Library/Application Support/Macromedia/Flash 8/<language>/Configuration/ComponentFLA

    The classes can be found here:

    • (Windows) C:\Program Files\Macromedia\Flash 8\en\First Run\Classes
    • (Macintosh) Hard Drive/Applications/Flash 8/First Run/Classes

    Note that the Classes folder structure has slightly changed. There still is the mx folder, which is of interest here, but you will also see FP7 and FP8 folders, which are specific to each player version that the authoring environment can target.

  • The documentation has been improved to include better coverage of the components and skinning. This helps in identifying component properties more easily than before.

About the author

Chafic Kazoun is the founder and Chief Software architect at Atellis, and is widely considered one of the world's top experts on Flex (outside of the Adobe Flex engineering team). He has worked with Flash technologies since 1998 and with Flex since its inception, and he has a deep understanding of the internals of the Flex framework. He maintains a busy speaking and consulting schedule. When he's not busy developing solution-based applications, Chafic is actively involved in the Flash community, delivering presentations at numerous conferences including Adobe's MAX, Flashforward, FITC, Spark Europe, and MXDU. He is also the contributor of numerous published works and is the author of Programming Flex 2.0, a book recently released by O'Reilly Publishing. He is also an Adobe Community Expert, and shares his thoughts on his blog.