I need help on how to make the Falling Snow 2.0 tutorial. I’ve been following the instruction thoroughly but for some reason there were always errors on “onClipEvent”. I hope someone can help and guide me to do the Falling Snow.
Thanks alot i’ll be waiting for your help guys.
Peace
Here is my .fla file : http://www.angelfire.com/me4/dean/3.fla
And here is my code in the
tags:
action: Frame 1 -->>>
snowflakes = 75;
do {
duplicateMovieClip(snow, "snow"+k, k);
k++;
} while (k != snowflakes);
snow, <snow> -->>>
onClipEvent (load) {
//variables
width = 300;
height = 200;
//random x,y, and alpha
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 20+Math.random()*50;
//random x and y for flakes
this._x = -width+Math.random()*(3*width);
this._y = -10+Math.random()*height;
//speed and trigonometric value
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
rad = 0;
}
onClipEvent (enterFrame) {
// horizontal movement
rad += (k/180)*Math.PI;
xmovement = _root._xmouse;
this._x -= Math.cos(rad)+(xmovement-(width/2))/50;
// vertical movement
this._y += i;
// remove clips when they misbehave (overstep boundaries)
if (this._x>(width+50)) {
this._x = -45;
this._y = Math.random()*height*2;
}
if (this._x<-50) {
this._x = width+45;
this._y = Math.random()*height*2;
}
if (this._y>=height) {
this._y = -50;
this._x = -width+Math.random()*(3*width);
}
}
I think this is what you are looking for
Yeah dude, that’s definitely im looking for. But how did it work? What did you do?
- create snow movieclip (that little white circle)
- set it’s instance name to “snow”
- change the for-while loop in the main timeline and set an initial value to the variable k before that loop.
- add the load and enterframe code to the snow movieclip
- I think that was it
Thanks Dude…
However, i was wondering how come Falling Snow 2.0 is in the tutorial but it’s not working.
it is working, but I think you are required to do the snow tutorial v 1 first … I think…
OH i c, so that one that you told thats V1.0 am i right?
Well thanks alot for your help