Image Appearance Effect : Fall Down

In this Image Appearance Effect tutorial, see how to reveal an image piece by piece with a fall down effect.

View DemoDownload Source

1. Here’s the code to achieve the Fall Down effect.
The code is the same as previous tutorials except for the highlighted lines.
To make the image’s pieces appear horizontally, we loop through the rows and through the columns (instead of columns and rows).
In the revealImage() function, we use the Tweenlite.from (instead of method to animate the y property of each image’s piece.

import com.greensock.*;
import com.greensock.easing.*;

const COLUMNS:uint=5;
const ROWS:uint=5;

var imagesGrid : Array = new Array();    

var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("image.jpg"));
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
function onImageLoaded(e:Event):void {
	var originalBitmapData:BitmapData =;
	var imageWidth : Number  = originalBitmapData.width / COLUMNS;
    var imageHeight : Number = originalBitmapData.height / ROWS;
	for (var i = 0; i < ROWS; i++) {
		for (var j = 0; j < COLUMNS; j++) {
			var imageHolder:MovieClip = new MovieClip();
			var image:Bitmap = new Bitmap();
			image.bitmapData=new BitmapData(imageWidth,imageHeight);
			  					new Rectangle(j * imageWidth, i * imageHeight,imageWidth, imageHeight),
			  					new Point(0,0));
			imageHolder.x= j*imageWidth ;
			imageHolder.y= i*imageHeight ;

function revealImage():void {
	for (var i:int = 0; i <imagesGrid.length; i++){
		var imageGrid:MovieClip = imagesGrid[i] as MovieClip;
		imageGrid.alpha = 1;

2. That’s it, test your movie to see it in action.

12 thoughts on “Image Appearance Effect : Fall Down

  1. Pingback: 通过一个网格来显示图片的动画效果—落下 - ActionScript - Learning-AS

  2. Ahmad

    I dont have knowledge about tweenlite

    Can you guide How I can add a function call when Tween finished or complete ?

  3. admin Post author

    @AHMAD :
    With Tweenlite, to call a function when the Tween is completed , simply specify the onComplete property like this:, 5, { alpha: 0.5 , onComplete:onFinishTween});

    function onFinishTween():void {
    /* your function */

    Check the tweenlite documentation ( for more infos.

Leave a Reply

Your email address will not be published. Required fields are marked *