Snow Fall :)

Copy and paste in the first frame of the movie (you need a dark background)

// Pom 3/01/2003
// Credits:
// Bit 24/12/2002
// Kirupa snow tutorial
points = [];
maxPoints = 100;
y = 200;
for (i=0; i < maxPoints; i++) {
	points* = {x:20+500/(maxPoints-1)*i, y:y};
}
createEmptyMovieClip("bombe",5000);
bombe.lineStyle(5,0xffffff,100);
bombe.lineTo(0.15,0.45);
bombe._visible=false;

createEmptyMovieClip("land", 1000000);
dep = 1;
onEnterFrame = function () {
	if (getTimer()-start > 100) {
		start = getTimer();
		bomb = bombe.duplicateMovieClip("b"+dep, dep++);
		bomb.frequency=Math.random()*Math.PI;
		bomb.ySpeed = 1+Math.random()*2;
		bomb._xscale = bomb._yscale=50+Math.random()*50;
		bomb._alpha = 75+Math.random()*100;
		bomb.onEnterFrame = fall;
		bomb._x = Math.random()*250+Math.random()*250+20;
		bomb._y = 0;
	}
};
drawLand();
function destroy(x) {
	points[x].y -= 4;
	if (x) {
		points[x-1].y -= 1;
	}
	if (x < maxPoints-1) {
		points[x+1].y -= 1;
	}
	drawLand();
}
function drawLand() {
	with (land) {
		clear();
		beginFill(0xffffff, 100);
		lineStyle(1, 0xffffff, 100);
		moveTo(points[0].x, points[0].y);
		for (i=0; i < maxPoints; i++) {
			lineto(points*.x, points*.y);
		}
		lineTo(520, 380);
		lineTo(20, 380);
		endFill();
	}
}
function fall() {
	this.rad += this.frequency*(Math.PI/180);
	this._x += Math.cos(this.rad);
	this._y += this.ySpeed;
	if (land.hitTest(this._x, this._y, true)) {
		x = Math.round((this._x-20)/500*maxPoints);
		removeMovieClip(this);
		destroy(x);
	}
}

pom <:}

replace all < with something like [*i]< because kirupa will cut off all code post < (assuming its renegade html)

… nm you got it :wink:

wow that’s a nice piece of code, nice effect too, I’m sitting here waiting for it to fill up the screen. :stuck_out_tongue:

thats pretty cool! the best snow effect so far :beam:

:A+:

yep … that’s sweet :smirk:

Sweet reverse rendition of bits file, excellent work man.

<~~~Jealous :wink:

We’ll see what will come out of this (-: : http://www.bit-101.com/forum/viewtopic.php?t=786&start=0&postdays=0&postorder=asc&highlight=

Pom, is this your website?

http://surface.yugop.com/

I’ve found it on your bit101 profile and I’m shocked cause I’ve surfed onto it a few times before. It has some amazing stuff on there. =)

:stuck_out_tongue: Not at all [SIZE=1]I wished…[/SIZE] Actually, I was pissed off because a lot of people used to ask questions about 2advanced all the time (not that much anymore, I don’t know why), so I put 2advanced in my profile. And now it changes from time to time, theory7, yugop, uncontrol… :beam:

lol, you tricked me…I was all amazed cause I thought it was yours…hahaha You should do something like that though, put together a site with your stuff, I’m pretty sure you have plenty too. I still have the blob thing you posted last time. :geek:

Well, I was thinking about it, of course, but I just can’t design anything that looks nice, even from a distance. I’ll have to work on it a bit more, I guess :hangover:

I just joined the bit forum, hopefully ill absorb some knowledge there. Too bad you don’t live here in cali, I wouldn’t mind helping you build a site as long as you teach me AS. :geek: