4.回到场景1,点第一帧从库中拖出元件叶子;
5.选中叶子,在属性中,改实例名为 snow ;
6.在元件叶子上输入如下AS语句: onClipEvent (enterFrame) { this._x = this._x + ((Math.random() * this._xscale) / -10); this._y = this._y + ((Math.random() * this._yscale) / 10); if (this._x < 0) { this._x = 1000; } if (this._y > 600) { this._y = 0; } }
7.添加图层2,在第一帧输入如下AS语句:
i = 1; while (i <= 10) { duplicateMovieClip ("snow", "snow" + i, i); setProperty("snow" + i, _x , random (1000)); setProperty("snow" + i, _y , random (600)); setProperty("snow" + i, _xscale , (Math.random() * 60) + 40); setProperty("snow" + i, _yscale , eval ("snow" + i)._xscale); setProperty("snow" + i, _alpha , eval ("snow" + i)._xscale + random (30)); i++; }
8.测试影片保存!