Technophobia

This is just another this animation I put together last night. It uses TweenLite, and BitmapData combined with a number of filters, to create this rather groovy effect. I think this is one of my better peices, so I hope you enjoy it.

NOTE: It is better viewed when you download it as I am having troubles with pop-ups in WordPress? When viewed on line it is incrediably slow, and not very good in general.

And here is the code:

import gs.TweenLite;
import gs.easing.Expo;

var amountOfCircles:Number = 30;
var stageW:Number = stage.stageWidth;
var stageH:Number = stage.stageHeight;
var ranX:Number = Math.random() * stageW - 300;
var ranY:Number = Math.random() * stageH - 300;
var ranAlpha:Number = Math.random() * .5;

var blur:BlurFilter = new BlurFilter(10, 10, 1);
var blurBM:BlurFilter = new BlurFilter(20, 0, 1);
var glowBM:GlowFilter = new GlowFilter(Math.round( Math.random()*0xFFFFFF ));

var bmd:BitmapData = new BitmapData(550, 500, true, 0x000000);
var bm:Bitmap = new Bitmap(bmd);
bm.x = 0;
bm.y = 0;
addChild(bm);

for (var i:uint = 0; i <= amountOfCircles; i++) {
	var circle:Circle = new Circle();
	circle.x = ranX + Math.random() * 100;
	circle.y = ranY + Math.random() * 100;
	circle.alpha = ranAlpha;
	circle.filters = [blur, glowBM];
	addChild(circle);
}

mover();
addEventListener(Event.ENTER_FRAME, enterFrame);
stage.addEventListener(Event.RESIZE, onResize);

function mover():void {

	for (var i:uint = 0; i <= amountOfCircles; i++) {
			var object:DisplayObject = getChildAt(i);
			if (object == bm) {
				i++;
			}
			else {
				object.alpha = ranAlpha;
			TweenLite.to(object, 1, {x: ranX + Math.random() * 1000, y: ranX + Math.random() * 1000, alpha: 0, ease:Expo.easeInOut, onComplete:mover, blurFilter:{blurX:Math.random()*100, blurY:Math.random() * 100}, tint:Math.round( Math.random()*0xFFFFFF )});
			glowBM.color = Math.round( Math.random()*0xFFFFFF );
			glowBM.alpha = ranAlpha / 2;
			}
	}
}

function enterFrame(evt:Event):void {
	bmd.draw(stage);
	bmd.applyFilter(bmd, bmd.rect, new Point(0,0), blurBM);
	bmd.applyFilter(bmd, bmd.rect, new Point(0,0), glowBM);
	bmd.scroll(10, 0);
}

function onResize(evt:Event):void {
	bm.x = bm.y = 0;
	bm.width = stage.stageWidth;
	bm.height = stage.stageHeight;
}

You can download the whole thing here: http://harry-northover-code-store.googlecode.com/files/Technophobia.zip

Harry.

About Harry

I am a 16 year old web designer/developer and I love any form of interactive media.
This entry was posted in Experimental, Flash and tagged , , . Bookmark the permalink.

One Response to Technophobia

  1. Pingback: Websites tagged "technophobia" on Postsaver

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create