Creating Custom Transitions

As you’ve already seen, transitions use effects. That means you can create custom transitions the same way you create custom effects. The only difference when creating custom transitions is that the effect instance class needs to handle the fallback rules for automatically determining the starting and ending property values. For example, we’ve seen that if you don’t explicitly set the xFrom, yFrom, xTo, and yTo properties for an effect used as a transition, the values are automatically retrieved from the target in the from and to states. When you create an effect instance class that you intend to use as a transition, you should include the ability to automatically detect these default property values.

EffectInstance subclasses automatically inherit a property called propertyChanges, which is of type mx.effects.effectClasses.PropertyChanges. The propertyChanges property has two properties: start and end. These properties are associative arrays containing the affected property values of the target in the from and to states.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset