flash页面出现雪花

来源:互联网 发布:淘宝pid获取 编辑:程序博客网 时间:2024/05/16 00:53

 zhen:

for (i=1; i<40; i++) {
 fiocco.duplicateMovieClip("fiocco"+i, i);
 eval("fiocco"+i)._x = Math.random()*500;
 eval("fiocco"+i)._y = Math.random()*333;
 eval("fiocco"+i)._xscale = Math.random()*70+30;
 eval("fiocco"+i)._yscale = eval("fiocco"+i)._xscale;
 eval("fiocco"+i)._alpha = eval("fiocco"+i)._xscale+20;
}

stop ();


an:

onClipEvent (enterFrame) {

this._x += Math.random ()*(this._xscale)/10 ;
this._y += Math.random ()*(this._xscale)/10 ;
if ( this._x > 500 ) {
this._x =0;
}

if ( this._y > 330 ) {
this._y =0;
}
}

shuxing:

fiocco
   

原创粉丝点击