Snow Falling Action Script Tweaking
Hello,
There are many action scripts out there for snow falling, custom made by various individuals. however this one in particular that I came across seems to have done the snow fall effect very nicely. The individual posted a video on Youtube showing the steps to make in order to generate this effect on Flash CS6. I took the same steps from the tutorial on my Adobe Animate CC 2017 yet I can never pull off the effect, as in nothing happens to the snowflake layer I create. Even after exporting the video to preview the movieclip's effect, nothing happens. I am still new to action scripts so its definitely my fault for not knowing what to do. I am wondering if someone here can guide me in their own words from start to finish while still using this script.
Link to the Youtube Tutorial:
https://www.youtube.com/watch?v=TpTeEPni05Y
Here is a copy of the script used in the Youtube video:
addEventListener (Event.ENTER_FRAME,snow);
function snow (event:Event):void {
var scale:Number=Math.random()*.6;
var _sf:snowflake=new snowflake();
_sf.x=Math.random()*640;
_sf.scaleX=scale;
_sf.scaleY=scale;
var speed:Number=Math.random()*2;
var RA:Array=new Array(-1,1);
var lf:int=RA[Math.round(Math.random())];
stage.addChild (_sf);
_sf.addEventListener (Event.ENTER_FRAME,snowfall);
function snowfall (event:Event):void {
_sf.y+=speed;
_sf.rotation+=Math.random()*20;
_sf.x+=(Math.random()*2)*lf;
}
}
