I have a flash file created in CS4. It opens to snowflakes falling randomly, has static dancers that slide to the center and they stop, then the snow just continues to fall. Took me forever to assemble the snow from online research only to have my client come back and say “Sorry they just told me the animation has to stop at 30 seconds” Any help will be greatly appreciated. I’m sure I have extra codes in my as file but it works. My snowflake.as files reads:
import flash.filters.BlurFilter;
class SnowFlake extends MovieClip{
private var speedMultiplier:Number = 3//5;
private var speedVariMultiplier:Number = 5//10;
private var viewWidth:Number = Stage.width;//550;
private var viewHeight:Number = Stage.height;//400;
private var speed:Number;
private var speedVariation:Number;
private var drift:Number;
function SnowFlake(){
speed = Math.random()*speedMultiplier;
speedVariation = Math.random()*speedVariMultiplier+1;
setSpeed(speed);
readyFlake();
moveMe();
}
private function setSpeed(n:Number):Void{
this.speed = (n * speedVariation)+1;
this._alpha=(random(10)+5)*10;
}
private function readyFlake():Void{
getDrift();
this.gotoAndStop(random(this._totalframes)+1)
this._y = Math.random()*viewHeight*-1;
this._x = Math.random()*viewWidth;
var bf:BlurFilter = new BlurFilter(drift*2,speed/2,2);
this.filters = [bf];
if(speed/2 < speedVariation){
this._xscale = this._yscale = 50;
}
this.cacheAsBitmap=true;
}
private function getDrift():Void{
drift = Math.random()*3;
var driftDirection:Number = Math.random()*10;
if(driftDirection < 5){
drift *= -1;
}
}
private function moveMe():Void{
this.onEnterFrame = everyFrame;
}
private function everyFrame():Void{
this._y += speed;
this._x += drift;
//this._rotation += drift;
if(this._y > viewHeight || this._x < 0 || this._x > viewWidth){
readyFlake();
}
}
}
[SIZE=5]Then on my top layer I have the action code:[/SIZE]
//mcHit.onRelease=go
mcHit.onRelease=function(){
getURL(_level0.clickTag, “_blank”);
}
mcHit.onRollOver=function(){
mcQuote.alphaTo(0,.5)
mcBuy.alphaTo(100,1)
}
mcHit.onReleaseOutside=mcHit.onRollOut=function(){
mcBuy.alphaTo(0,.5)
mcQuote.alphaTo(100,1)
}
go()
//let it snow ===============================================================
var flakeCount:Number = 0;
var aBlends:Array=new Array(‘normal’,‘overlay’,‘screen’)
function createFlakes():Void{
var flake:MovieClip=this.createEmptyMovieClip(“flake_”+flakeCount,flakeCount+1000);
flake.attachMovie(“snowFlake_mc”,“flake”,1);
flake.blendMode=aBlends[random(aBlends.length)]
flake._alpha=random(60)+50
trace(flake.blendMode)
flakeCount++;
}
var numFlakes:Number = 25;
mcDancers.swapDepths(2000)
for(var i:Number=0;i<numFlakes;i++){
createFlakes();
}
for(var t:Number=1;t<9;t++){
this[‘tree’+t]._alpha=0
this[‘tree’+t].alphaTo(100,1,‘easeinoutsine’,2+(t*.1))
}
Any help you can give will be appreciated… and of course this is rush! Thank You