Packagemx.states
Classpublic class Transition

The Transition class defines a set of effects that play in response to a change of view state. While a view state definition defines how to change states, a transition defines the order in which visual changes occur during the state change.

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 Syntaxexpanded Hide MXML Syntax

The <mx:Transition> tag defines the following attributes:

  <mx:Transition
    Properties
    id="ID"
    effect=""
    fromState="*"
    toState="*"
  />
  

Default MXML Propertyeffect

See also

mx.effects.AddChildAction
mx.effects.RemoveChildAction
mx.effects.SetPropertyAction
mx.effects.SetStyleAction


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
Constructor.
Transition
Property detail
effectproperty
public var effect:IEffect

The 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.

fromStateproperty 
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 "&#42;".

toStateproperty 
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 "&#42;".

Constructor detail
Transition()constructor
public function Transition()

Constructor.