FLASH停止特效

2025-12-17 16:05:24
推荐回答(1个)
回答1:

我把程序稍微改了一下,你可以在场景的帧上直接加代码
for (var i = 0; i<100; i++) {
_root.attachMovie("snow", i, i);
_root[i]._x = 550*Math.random();
_root[i]._y = 400*Math.random();
_root[i]._rotation = 60*Math.random();
_root[i]._xscale = _root[i]._yscale=_root[i]._alpha=100*Math.random();
_root[i].onEnterFrame = function() {

//this._x+=this._xscale/10
//this._x%=550
this._y += this._yscale/10;
this._y %= 400;

};
}var j=0;
_root.onEnterFrame=function(){

j++;if(j>=40)
{ for(var k=0;k<100;k++)
_root[k].removeMovieClip();
}
}