Using Skinning - Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual

Migrating applications to flex 2
Table of Contents

Advertisement

Using units
Flex no longer supports using the plus (+) and minus (-) unit modifiers.
Flex no longer supports the em and ex unit types.

Using skinning

Previously, you defined graphical skins as symbols in a FLA file, exported the FLA file as a
SWC file from the Flash IDE, and added it to your Flex source path. The symbols in the new
SWC file replaced existing symbols in Flex component skins.
Now, all skins are specified as style properties that can be set through CSS or inline. Do not
use the symbol substitution method of defining new skins.
To use a programmatic skin, add the class to your ActionScript source path when you
compile. Then use the
statement to reference that class in your
ClassReference()
application's CSS. For example, if you have MySkins/MyButtonSkin.as, you use the following
syntax to reference the class:
Button {
upSkin: ClassReference("MySkins.MyButtonSkin");
}
You use the
statement to reference graphic skins in CSS.
Embed()
Many style properties that referred to skins are now deprecated. For example, the
property is obsolete and was replaced by the
style property.
brokenImage
brokenImageSkin
This style property is of type Class. Flex throws an error if you try to apply a style to a
property that no longer exists. For a list of available skin style properties, see the control's
entry in the Adobe Flex 2 Language Reference.
The drawing methods such as
that you would use in programmatic skinning are
moveTo()
now accessed through the
property of the MovieClip object. To use them you must
graphics
import the flash.display.* package.
124
Styles and Skinning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents