本帖最后由 岩新新 于 2019-12-31 17:02 编辑
制作方法: 1. 打开FLASH 8,新建FLASH文档,设置属性,1000×600,帧数12, 背景为蓝色;2. 点插入,新建元件影片剪辑,名称:叶子,确定; 3. 导入一张扣好叶子图片; 图片大小100x80
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.测试影片保存!
|