User Guide

76 Chapter 5: Customizing Components
Each of the classes in the mx.transitions.easing package provides the following three easing
methods:
Because the easing methods are static methods of the easing classes, you never need to instantiate
the easing classes. The methods are used in calls to
setStyle(), as in the following example.
import mx.transitions.easing.*;
trace("_global.styles.Accordion = " + _global.styles.Accordion);
_global.styles.Accordion.setStyle("openDuration", 1500);
_global.styles.Accordion.setStyle("openEasing", Bounce.easeOut);
Note: The default equation used by all transitions is not available in the easing classes listed above.
To specify that a component should use the default easing method after another easing method has
been specified, call
setStyle("openEasing", null).
Getting style property values
To retrieve a style property value, use
UIObject.getStyle(). Every component that is a subclass
of UIObject (which includes all version 2 components except the Media components) inherits the
getStyle() method. This means you can call getStyle() from any component instance, just as
you can call
setStyle() from any component instance.
The following code gets the value of the
themeColor style and assigns it to the variable oldStyle:
var myCheckBox:mx.controls.CheckBox;
var oldFontSize:Number
oldFontSize = myCheckBox.getStyle("fontSize");
trace(oldFontSize);
None
Provides an equal movement from start to end with no effects, slowing, or
speeding. This transition is also commonly referred to as a linear transition.
Regular
Provides for slower movement at one or both ends for a speeding-up
effect, a slowing-down effect, or both.
Strong
Provides for much slower movement at one or both ends. This effect is
similar to Regular but is more pronounced.
Easing method Description
easeIn
Provides the easing effect at the beginning of the transition.
easeOut
Provides the easing effect at the end of the transition.
easeInOut
Provides the easing effect at the beginning and end of the transition.
Easing class Description