Animate Flash Rotate transition effect with TransitionManager Class. The transition effect is a mimic of rotation of the MovieClip.

The finished Flash Movie of this tutorial is shown as below. Click on the above Flash Movie and play around. Please change the “ccw” and ‘degrees” to compare the difference in transition effects.

Flash ActionScript Codes:

//Use ComboBox controls
import fl.controls.ComboBox;

//Add items to the ccwCombo
ccwCombo.addItem( {label: "true" } );
ccwCombo.addItem( {label: "false" } );

//Add items to the degreesCombo
degreesCombo.addItem( {label: "180" } );
degreesCombo.addItem( {label: "360" } );
degreesCombo.addItem( {label: "720" } );
degreesCombo.addItem( {label: "1080" } );

//Declare ccw
var ccwValue:Boolean;

//Declare degree
var degreesValue:int;

//import transition classes
import fl.transitions.*;
import fl.transitions.easing.*;

/*
type -> Transition type
There are total 10 Transition type working with TransitionManager
They are:
Blinds, Fade, Fly, Iris, Photo,
Rotate, Squeeze, Wipe, PixelDissolve, Zoom
*/

/*
direction:Transition.IN -> Appear with Transition effect
direction:Transition.OUT -> Disppear with Transition effect
*/

/*
duration -> Time in seconds to finish the Transition effect
This is an integer
*/

/*
ccw -> counterclockwise rotation (either true or false)
false - clockwise rotation
true - counterclockwise rotation
*/

/*
degrees -> number of degree rotated
Proposed value: 1 - 9999
for example:
360 - 1 full rotation
720 - rotate twice
1080 - rotate three times
*/


enter_btn.addEventListener(MouseEvent.CLICK, runTransition);

 

function runTransition(evt:MouseEvent):void {
//ccw
if (ccwCombo.selectedIndex == 0) {
ccwValue = true;

} else if (ccwCombo.selectedIndex == 1) {
ccwValue = false;

}


//degrees
if (degreesCombo.selectedIndex == 0) {
degreesValue = 180;

} else if (degreesCombo.selectedIndex == 1) {
degreesValue = 360;

} else if (degreesCombo.selectedIndex == 2) {
degreesValue = 720;

} else if (degreesCombo.selectedIndex == 3) {
degreesValue = 1080;

}

//Start the TransitionManager
TransitionManager.start(island_mc, {
type: Rotate,
direction: Transition.IN,
duration: 3,
ccw: ccwValue,
degrees: degreesValue
}
);

}

Download Source File:

TransitionManager-Pack.zip

The download zip file contains the following files:
transitionmanager-wipe.fla
transitionmanager-zoom.fla
transitionmanager-squeeze.fla
transitionmanager-blinds.fla
transitionmanager-fade.fla
transitionmanager-fly.fla
transitionmanager-iris.fla
transitionmanager-photo.fla
transitionmanager-pixeldissolve.fla
transitionmanager-rotate.fla