Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 241

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

Flex uses the following rules to determine the start and end values of effect properties when
you use the effect in a transition:
If the effect defines the values of any properties, it uses the properties in the transition, as
1.
the following example shows:
<mx:Transition fromState="*" toState="*">
<mx:Sequence id="t1" targets="{[p1,p2,p3]}">
<mx:Blur duration="100"
blurXFrom="0.0" blurXTo="10.0" blurYFrom="0.0" blurYTo="10.0"/>
<mx:Parallel>
<mx:Move duration="400"/>
<mx:Resize duration="400"/>
</mx:Parallel>
<mx:Blur duration="100"
blurXFrom="10.0" blurXTo="0.0" blurYFrom="10.0" blurYTo="0.0"/>
</mx:Sequence>
</mx:Transition>
In this example, the two Blur filters define the properties of the effect.
If the effect does not define the start values of the effect, the effect determines the values
2.
from the
EffectInstance.propertyChanges
sets the
propertyChanges
component, as defined by the current view state. For more information on the
propertyChanges
on page
242.
In the example in step 1, notice that the Move and Resize effects do not define start values.
Therefore, Flex determines the start values from the current size and position of the effect
targets in the current view state, and passes that information to each effect instance by
using the
propertyChanges
If the effect does not define the end values of the effect, the effect determines the values
3.
from the
Effectinstance.propertyChanges
sets the
propertyChanges
by the destination view state. For more information on the
see
"How Flex initializes the propertyChanges property" on page
In the example in rule 1, Flex determines the end values of the Move and Resize effects
from the size and position of the effect targets in the destination view state. In some cases,
the destination view state defines those values. If the destination view state does not define
the values, Flex determines them from the setting of the base view state, and passes that
information to each effect instance by using the
If there are no explicit values, and Flex cannot determine values from the current or
4.
destination view states, the effect uses its default property values.
property by using information from the current settings of the
property, see
"How Flex initializes the propertyChanges property"
property.
property by using information about the component, as defined
property passed to the effect instance. Flex
property passed to the effect instance. Flex
propertyChanges
242.
property.
propertyChanges
Writing an effect for a transition
property,
241

Advertisement

Table of Contents
loading

Table of Contents