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 ActionScript Photo Transition Effect with TransitionManager Class

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

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

Flash Photo transition effect with TransitionManager Class. The transition effect is a mimic of fade in and fade out with some photo exposure effect.

The finished Flash Movie of this tutorial is shown as above. Click on the above Flash Movie and play around. Please change the "easing" and "duration" to compare the difference in transition effects. For Photo transition effect, many people will use with ease out and ease in effect. This will enhance the photo exposure effect.

Flash ActionScript Codes:

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

//Add items to easingMethodCombo
easingMethodCombo.addItem( {label: "Regular.easeIn" } );
easingMethodCombo.addItem( {label: "Regular.easeOut" } );
easingMethodCombo.addItem( {label: "Regular.easeInOut" } );
easingMethodCombo.addItem( {label: "Bounce.easeIn" } );
easingMethodCombo.addItem( {label: "Bounce.easeOut" } );
easingMethodCombo.addItem( {label: "Bounce.easeInOut" } );
easingMethodCombo.addItem( {label: "None.easeNone" } );

//Add items to the durationCombo
durationCombo.addItem( {label: "2" } );
durationCombo.addItem( {label: "4" } );
durationCombo.addItem( {label: "6" } );

//Declare the easeMethod
var easeMethod:Function;

//declare duration
var durationValue: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
*/

/*
easing -> easing effect
easing:easingClass.easingMethod
There are 6 easing classes:
Back:
Extends the animation beyond the transition range at one
or both ends at once to resemble an overflow effect.
Bounce:
Adds a bouncing effect within the transition range at
one or both ends. The number of bounces relates to the
duration — longer durations produce more bounces.
Elastic:
Adds an elastic effect that falls outside the transition
range at one or both ends. The amount of elasticity is
unaffected by the duration.
Regular:
Adds slower movement at one or both ends. This feature
enables you to add a speeding-up effect, a slowing-down
effect, or both.
Strong:
Adds slower movement at one or both ends. This effect
is similar to Regular easing, but it's more pronounced.
None:
Adds an equal movement from start to end without effects,
slowing, or speeding up.

The 6 easing classes each have 3 easing methods:
easeIn: easing effect at the beginning of the transition.
easeOut: easing effect at the end of the transition.
easeInOut: easing effect at both beginning and end of transition.
*/

enter_btn.addEventListener(MouseEvent.CLICK, runTransition);

 

function runTransition(evt:MouseEvent):void {

//easing Method
if (easingMethodCombo.selectedIndex == 0) {
easeMethod = Regular.easeIn;} else if (easingMethodCombo.selectedIndex == 1) {easeMethod = Regular.easeOut;} else if (easingMethodCombo.selectedIndex == 2) {easeMethod = Regular.easeInOut;} else if (easingMethodCombo.selectedIndex == 3) {easeMethod = Bounce.easeIn;} else if (easingMethodCombo.selectedIndex == 4) {easeMethod = Bounce.easeOut;} else if (easingMethodCombo.selectedIndex == 5) {easeMethod = Bounce.easeInOut;} else if (easingMethodCombo.selectedIndex == 6) {easeMethod = None.easeNone;}//duration
if (durationCombo.selectedIndex == 0) {
durationValue = 2;} else if (durationCombo.selectedIndex == 1) {durationValue = 4;} else if (durationCombo.selectedIndex == 2) {durationValue = 6;}//Start the TransitionManager
TransitionManager.start(island_mc, {
type:Photo,
direction:Transition.IN,
duration:durationValue,
easing:easeMethod
}
);

}

Download Flash Source File:

Flash Source File transitionmanager-photo.fla

Remarks:

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