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

Transition Effect with Tween Animation Flash AS 3 Tutorial (1)

This flash tutorial series show how to use Transition effect with TransitionManager and other animation with ActionScript 3. We can create very interesting animation with transition effect and other animation classes. The two flash tutorials have the same effect. In the first flash tutorial, the island and sea picture has been inserted into the Flash Movie. In the second tutorial, the island and sea picture is an external file. The picture will be loaded into the Flash Movie by ActionScript.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

You can create very interesting flash animation if used with both TransitionManager and other flash animation classes. In this flash tutorial, we use TransitionManager and Tween Class together to create the animation.

The finished Flash Movie of this tutorial is shown as above. The transition effect of the landscape was created with TransitionManager. While the sun motion animation was created with Tween animation.

Flash ActionScript Codes:

//Classes to use the Transition Effect
import fl.transitions.*;
import fl.transitions.easing.*;

//Create a Timer object and store it in a variable called timer.
//The timer will trigger in 3000 milliseconds (3 seconds)
//1000 milliseconds = 1 second
//The repeatCount is 1, i.e. timer will trigger only ONE time
//Summary:
//Create a Timer instance that will trigger in 4 seconds for one time
var timer:Timer = new Timer(4000, 1);

//Timer object created will not start automatically
//You have to start it
timer.start();

//Add an event listener to the timer object (timer)
//The event that listen is called TIMER that will trigger after 4 seconds
//When the TIMER event is triggered, it will call the sunrise function
timer.addEventListener(TimerEvent.TIMER, sunrise);

 

function sunrise(e:TimerEvent):void {

//Apply Tween animation to the sun
var TweenX:Tween = new Tween(sun_mc, "x", Regular.easeOut, sun_mc.x, 200, 5, true);
var TweenY:Tween = new Tween(sun_mc, "y", Regular.easeOut, sun_mc.y, 210, 5, true);

//Remove listener that no longer in use
timer.removeEventListener(TimerEvent.TIMER, sunrise);

}

//Start the TransitionManager
TransitionManager.start(island_mc, {
type: PixelDissolve,
direction: Transition.IN,
duration: 3,
easing: None.easeNone,
xSections: 20,
ySections: 20
}
);

Download Flash Source File:

Flash Source File transitionmanager-animation-1.fla

Remarks:

This Flash ActionScript tutorial shows how to use Transition Effect and other animation class together. In this tutorial, the landscape was inserted into the Flash Movie. However some people would like to use the picture as external file. In other words, the picture will be loaded into the Flash Movie by ActionScript. The next flash actionscript tutorial will show how to do that.