Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

Flash AS 3 Rotate Transition Effect with TransitionManager Class

This Flash ActionScript tutorial shows how to use Rotate transition effect with TransitionManager Class with Flash ActionScript 3.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

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 above. 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 Flash Source File:

Flash Source File transitionmanager-rotate.fla

Remarks:

This Flash ActionScript tutorial shows how to use Rotate transition effect with TransitionManager Class.