So here I’m going to explain how to use Catalyst to create a simple animation (in this case a rotating door effect), export the code and re-factor it for your own needs (as a developer). Essentially using Catalyst as a springboard into creating a nice set of transitions and then fine-tuning them to your requirements.
flash catalyst fxp here
flash builder fxp here
completed example here
In Catalyst
1. Open catalyst, create a new project (or download and open the one above)
2. Create an additional state to the project and name them ‘front’ and ‘back’ accordingly.
3. Whilst the front state is active, add a label with Front on it. Similarly, while the back state is active add a label with back on it.
4. With the front -> back transition selected, add a 3d rotation to the front label with a y angle from 0 to 90 and duration of 500msecs. Then slide the fadeOut for the front label to just beyond the 3d rotation. Then add a 3d rotation for the back label with a y angle from -90 to 0. Move the fadeIn for the back label so that it’s level with the fadeOut of the front label. The final set of transitions should look like this.
5. Press play and you should see the front rotate and back appear behind it.
6. Now do the same for the back -> front transition. This time making sure you add a 3d rotate to the back label with a y angle of 0 to 90 and a 3d rotation to the front label with a y angle of -90 to 0. Move the fadeOut of the back label and fadeIn of the front label to 500msecs in.
7. play again and you should see back rotate round to front.
8. Save your project (mine was called flippy.fxp).
In Flash Builder
1. Open flash builder and import the fxp project you just created from Catalyst.
Notice the transition MXML created by Catalyst
<br />
<s:transitions></p>
<p> <s:Transition fromState="front" toState="back" autoReverse="true"><br />
<s:Parallel><br />
<s:Parallel target="{richtext1}"><br />
<s:Fade duration="0" startDelay="500"/><br />
<s:Rotate3D angleXFrom="0" angleXTo="0" angleZFrom="0" autoCenterTransform="true" angleYTo="90" angleYFrom="0" angleZTo="0" d:noAutoDelete="true"/><br />
</s:Parallel><br />
<s:Parallel target="{richtext0}"><br />
<s:Fade duration="0" startDelay="500"/><br />
<s:Rotate3D angleXFrom="0" angleXTo="0" angleZFrom="0" autoCenterTransform="true" angleYTo="0" angleYFrom="-90" angleZTo="0" d:noAutoDelete="true" startDelay="500"/><br />
</s:Parallel><br />
</s:Parallel><br />
</s:Transition></p>
<p> <s:Transition fromState="back" toState="front" autoReverse="true"><br />
<s:Parallel><br />
<s:Parallel target="{richtext1}"><br />
<s:Fade duration="0" startDelay="500"/><br />
<s:Rotate3D angleXFrom="0" angleXTo="0" angleZFrom="0" autoCenterTransform="true" angleYTo="0" angleYFrom="-90" angleZTo="0" d:noAutoDelete="true" startDelay="500"/><br />
</s:Parallel><br />
<s:Parallel target="{richtext0}"><br />
<s:Fade duration="0" startDelay="500"/><br />
<s:Rotate3D angleXFrom="0" angleXTo="0" angleZFrom="0" autoCenterTransform="true" angleYTo="90" angleYFrom="0" angleZTo="0" d:noAutoDelete="true"/><br />
</s:Parallel><br />
</s:Parallel><br />
</s:Transition></p>
<p> </s:transitions></p>
<p>
2. Above this are the 2 richtext elements you added in Catalyst (i.e. front and back) – comment these out and add a group for each of them. In the code below I’ve given the groups the same id as that of the original richtext labels so I know the pre-generated transitions will work.
<br /> <!--<s:RichText color="#2B4381" fontFamily="Arial" fontSize="115" id="richtext1" includeIn="front" tabStops="S0 S50 S100 S150 S200" text="front" x="251" y="226"/>--></p> <p> <s:Group width="300" height="350" id="richtext1" includeIn="front" horizontalCenter="0" verticalCenter="0"><br /> <s:Panel x="0" y="0" width="100%" height="100%" title="The Front"><br /> <s:Label x="56" y="52" text="So using the text labels created in Catalyst" fontSize="19" width="184" textAlign="center"/><br /> </s:Panel><br /> </s:Group></p> <p> <!--<s:RichText color="#2B4381" fontFamily="Arial" fontSize="115" id="richtext0" includeIn="back" tabStops="S0 S50 S100 S150 S200" text="Back" x="251" y="226"/>--></p> <p> <s:Group width="300" height="350" id="richtext0" includeIn="back" horizontalCenter="0" verticalCenter="0"><br /> <s:Panel x="0" y="0" width="100%" height="100%" title="The Back"><br /> <s:Label x="56" y="52" text="We converted them to groups and hey presto!" fontSize="19" width="184" textAlign="center"/><br /> </s:Panel><br /> </s:Group><br />
3. Add a button and in the click handler alternate the state between front and back so you can flip the groups between front and back. See the finished result here.
Conclusion
Ok, this is a simple demo, but by using Catalyst to generate a smooth sequence of transitions (using the visual aids in the time-line), you can take that code and modify it to your requirements in Flash Builder. By replacing the original labels with groups, the children of the groups (in this case a TitleWindow and a label) also inherit the animation effects of the parent group. Of course there’s no reason all of this couldn’t have been done in Flash Builder, but remembering all the animation mark-up, testing your work and not having a visual timeline to help
create multiple transitions make it all a bit harder.





