Animate Flash Squeeze transition effect with TransitionManager Class. As the name quite self-explanatory the effect, the transition effect is a mimic of squeezing 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 “dimension” and ‘duration” to compare the difference in transition effects.

Flash ActionScript Codes:

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

//Add items to the dimensionCombo
dimensionCombo.addItem( {label: "Vertical" } );
dimensionCombo.addItem( {label: "Horizontal" } );

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

//Declare dimension
var dimensionValue:int;

//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
*/

/*
dimension
0: Vertical strip
1: Horizontal strip
*/


enter_btn.addEventListener(MouseEvent.CLICK, runTransition);

 

function runTransition(evt:MouseEvent):void {
//dimension
if (dimensionCombo.selectedIndex == 0) {
dimensionValue = 0;

} else if (dimensionCombo.selectedIndex == 1) {
dimensionValue = 1;

}

//duration
if (durationCombo.selectedIndex == 0) {
durationValue = 2;

} else if (durationCombo.selectedIndex == 1) {
durationValue = 4;

} else if (durationCombo.selectedIndex == 2) {
durationValue = 4;

}

//Start the TransitionManager
TransitionManager.start(island_mc, {
type: Squeeze,
direction: Transition.IN,
duration: durationValue,
dimension: dimensionValue
}
);

} 

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