User Guide
242 Creating Effects
Using the propertyChanges property
The EffectInstance.propertyChanges property contains a PropertyChanges object. A
PropertyChanges object contains the properties described in the following table:
In the body of the
Effectinstance.play() method, you can examine the information in
the
propertyChanges property to configure the effect.
How Flex initializes the propertyChanges property
Before you can use the EffectInstance.propertyChanges property in your effect instance,
it has to be properly initialized. When you change the view state, Flex initializes
propertyChanges.start and propertyChanges.end separately.
The following steps describe the actions that occur when you change view states. Notice that,
Flex initializes
propertyChanges.start as part of step 4, and initializes
propertyChanges.end as part of step 7:
1. You set the currentState property to the destination view state.
2. Flex dispatches the currentStateChanging event.
3. Flex examines the list of transitions to determine the one that matches the change of view
state.
4. Flex calls the Effect.captureStartValues() method to initialize
propertyChanges.start for all effect instances.
You can also call
Effect.captureStartValues() to initialize an effect instance used
outside of a transition.
Property Description
target
A target component of the effect. The end and start properties of the
PropertyChanges class define how the target component is modified by the
change to the view state.
start
An object that contains the starting properties of the target component, as
defined by the current view state. For example, for a
target component that is
moved and resized by a change to the view state, the
start property contains
the starting position and size of the component, as the following example shows:
{x:00, y:00, width:100, height:100}
end
An object that contains the ending properties of the target component, as
defined by the destination view state. For example, for a
target component that
is moved and resized by a change to the view state, the
end property contains
the ending position and size of the component, as the following example shows:
{x:100, y:100, width:200, height:200}