playing

 

Wednesday December 5th 2007 11:24 AM PST

Source:

import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.ColorTransform;


myBitmapData = new BitmapData(500, 500, false, 0x000000);
bmpCover = new BitmapData(500, 500, false, 0x000000);
createEmptyMovieClip("bitmapHolder",10);
my_matrix = new Matrix();

bitmapHolder.attachBitmap(myBitmapData,bitmapHolder);

function drawIt() {

	offset += .1;
	myBitmapData.draw(bmpCover);

	for (x=0; x<20; x++) {
		for (y=0; y<20; y++) {

			my_matrix.tx = x*10-y*10+250;
			my_matrix.ty = y*5+x*5+200;
			a = Math.sin(x/2+offset)*20+Math.cos(y/3+offset)*25;
			my_matrix.ty += a;
			my_matrix.ty += Math.random()*2;
			my_matrix.tx += Math.random()*2;
			tempTransform = new ColorTransform(1, 1, 1, 1, -50, -50, -a*1.5, 0);
			myBitmapData.draw(bit,my_matrix,tempTransform);

		}
	}

}

offset = 0;
this.onEnterFrame = drawIt;
stop();

The only thing you've gotta do is drop a movieClip on stage and call the instace "bit". The script will draw with that movieClip.

.fla

this is so absolutely similar to Dustin Andrew's little piece. I just looked at his example, and said, "damn, I can do that".


No Comments Yet

Add Your Own Comment: --
Comments will go through an approval process and will be added when they are approved.

Name:
Email:
Homepage: