PDA

View Full Version : Kirupa's falling snow 2.0 in flash 8?



Shoo
December 23rd, 2005, 11:02 AM
heya everyone me again :red:

kirupa's falling snow 2.0 tutorial for flash MX 04 will only work in flash 8 if you publish it in flash 6 format (because flash MX 04 = Flash 6) But in my new animation I am using filter effects as well as falling snow.

My problem: Filter effects needs flash 8 format
Falling snow 2.0 needs flash 6 format

Does anyone have either a new tutorial for falling snow 2 that will work in flash,
or another way of sorting it out?

Thanks, Shoo :wasted:

Krilnon
December 23rd, 2005, 11:11 AM
http://www.kirupa.com/forum/showthread.php?t=202875&highlight=snow+2.0
http://www.kirupa.com/forum/showthread.php?t=201914&highlight=snow+2.0
http://www.kirupa.com/forum/showthread.php?t=198307&highlight=snow+2.0

Try searching first, lots of people have had this same question :) (I linked 3 different threads)

Shoo
December 23rd, 2005, 01:32 PM
ahh danke ein schwarpshlich!!
thanks :red:

TheCanadian
December 23rd, 2005, 04:50 PM
MX04 == 7
MX == 6

Shoo
December 24th, 2005, 12:39 PM
oh :-/ lol

devonair
December 24th, 2005, 03:27 PM
here's a quick copy and paste version I made last year based on Kirupa's example:

import flash.filters.BlurFilter;
//
var numOfFlakes:Number = 120; // change to whatever
var movWidth:Number = Stage.width;
var movHeight:Number = Stage.height;
var minDist:Number = 50; // how close you can move mouse to make snow swirl
var depthBlur:BlurFilter = new BlurFilter(0, 0, 3);
//
function le****now():Void {
for (var i = 0; i<numOfFlakes; i++) {
var myFlake:MovieClip = newFlake();
myFlake.radians = 0;
myFlake.I = 1+Math.random()*2;
myFlake.K = -Math.PI+Math.random()*Math.PI;
myFlake.onEnterFrame = function() {
this.radians += (this.K/180)*Math.PI;
this._x -= Math.cos(this.radians);
this._y += this.I;
if (this._y>=movHeight) {
this._y = -5;
}
if ((this._x>=movWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movWidth;
this._y = -5;
}
var dx:Number = this._x-_root._xmouse;
var dy:Number = this._y-_root._ymouse;
var dist:Number = Math.sqrt(dx*dx+dy*dy);
if (dist<=minDist) {
this._rotation += dist;
}
};
}
}
function newFlake():MovieClip {
var f:MovieClip = this.createEmptyMovieClip("f"+i, this.getNextHighestDepth());
with (f) {
lineStyle(Math.random()*7, 0xffffff, 100);
moveTo(5, 5);
lineTo(6, 5);
_x = Math.random()*movWidth;
_y = Math.random()*movHeight;
_alpha = 50+Math.random()*50;
}
depthBlur.blurX = depthBlur.blurY=Math.random()*4;
f.filters = [depthBlur];
f.cacheAsBitmap = true;
return f;
}
//
le****now();
the snow will swirl around the mouse and has a random blur for a little depth... Something to play with anyway..