| Package | mx.states |
| Class | public class Transition |
To define a transition, you set the transition property of an Application to an Array of Transition objects.
You use the toState and fromState properties of
the Transition class to specify the state changes that trigger the transition.
By default, both the fromState and toState properties
are set to "*", meaning apply the transition to any changes to the view state.
You can use the fromState property to explicitly specify a
view state that your are changing from, and the toState property
to explicitly specify a view state that you are changing to.
If a state change matches two transitions, the toState property
takes precedence over the fromState property. If more than one
transition match, Flex uses the first definition in the transition array.
You use the effect property to specify the Effect object to play
when you apply the transition. Typically, this is a composite effect object,
such as the Parallel or Sequence effect, that contains multiple effects,
as the following example shows:
<mx:Transition id="myTransition" fromState="*" toState="*">
<mx:Parallel>
...
</mx:Parallel>
</mx:Transition>
MXML Syntax
Hide MXML Syntax
The <mx:Transition> tag
defines the following attributes:
<mx:Transition
Properties
id="ID"
effect=""
fromState="*"
toState="*"
/>
Default MXML Propertyeffect
See also
| Property | Defined by | ||
|---|---|---|---|
| effect : IEffect
The IEffect object to play when you apply the transition.
| Transition | ||
| fromState : String = "*"
A String specifying the view state that your are changing from when
you apply the transition.
| Transition | ||
| toState : String = "*"
A String specifying the view state that you are changing to when
you apply the transition.
| Transition | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| Transition | ||
| effect | property |
public var effect:IEffectThe IEffect object to play when you apply the transition. Typically, this is a composite effect object, such as the Parallel or Sequence effect, that contains multiple effects.
The effect property is the default property of the
Transition class. You can omit the <mx:effect> tag
if you use MXML tag syntax.
| fromState | property |
public var fromState:String = "*"A String specifying the view state that your are changing from when you apply the transition. The default value is "*", meaning any view state.
You can set this property to an empty string, "", which corresponds to the base view state.
The default value is "*".
| toState | property |
public var toState:String = "*"A String specifying the view state that you are changing to when you apply the transition. The default value is "*", meaning any view state.
You can set this property to an empty string, "", which corresponds to the base view state.
The default value is "*".
| Transition | () | constructor |
public function Transition()Constructor.