作前准备
下载规格约为50左右的铜钱、玉环、元宝各一张(最好是无背景的透明图片)和规格为550*400的蓝天白云背景图片一张,经过制图软件(ps、fw)处理后,保存到指定的文件夹待用。
制作过程
1.启动flash8软件。
2.确立文档属性 设置动画尺寸为550*400,背景颜色深绿,帧频36,其它默认,点击确定,进入场景1。如图1所示:
图1
3.将准备好的素材图片导入库中,待用。
素材图
4.创建影片剪辑元件
(1)选择“插入-新建元件”,建立一个名为“铜钱”的影片剪辑元件,点击确定,进入元件编辑区。就一个图层。
选择图层1第1帧,从库中拖出铜钱素材图片到舞台,抠去背景,设置其规格为36*36,全居中。如图2所示:
图2
(2)选择“插入-新建元件”,建立一个名为“玉环”的影片剪辑元件,点击确定,进入元件编辑区。就一个图层。
选择图层1第1帧,从库中拖出玉环素材图片到舞台,抠去背景,设置其规格为30*30,全居中。如图3所示:
图3
(3)选择“插入-新建元件”,建立一个名为“元宝”的影片剪辑元件,点击确定,进入元件编辑区。就一个图层。
选择图层1第1帧,从库中拖出元宝素材图片到舞台,抠去背景,设置其规格为58*30,全居中。如图4所示:
图4
5.编辑制作场景
进入场景1,添加两个图层,共三个图层。自下而上命名为背景、三宝、as。
(1)选择背景图层第1帧,从库中拖出蓝天白云背景图片到舞台,规格550*400,全居中。如图5所示:
图5
(2)选择三宝图层第1帧,从库中依次拖出“元宝、铜钱、玉环”影片剪辑元件到舞台,规格不变,将其放置在舞台之外任何地方。如图6所示:
图6
A.点击元宝实例,在属性面板填写其实例名称为: mc1 。如图7所示:
图7
再点击该实例,按f9,打开动作面板,在as编辑区输入,如下影片剪辑指令语句:
onClipEvent (enterFrame) { if (this._y > Stage.height || this._x > Stage.width || this._x < 0) { this._y = -Math.random() * 50; this._x = Math.random() * Stage.width; } else { this._y = this._y + (this.maxconfeteSpeed + 1); this._x = this._x + (this.vento - 1); } this._alpha = 100; }
B.点击铜钱实例,在属性面板填写其实例名称为: mc2 。如图8所示:
图8
再点击该实例,按f9,打开动作面板,在as编辑区输入,如下影片剪辑指令语句:
onClipEvent (enterFrame) { this._rotation = this._rotation - (this.maxconfeteSpeed + -1); if (this._y > Stage.height || this._x > Stage.width || this._x < 0) { this._y = -Math.random() * 50; this._x = Math.random() * Stage.width; } else { this._y = this._y + (this.maxconfeteSpeed + 1); this._x = this._x + (this.vento - 1); } this._alpha = 100; }
C.点击玉环实例,在属性面板填写其实例名称为: mc3 。如图9所示:
图9
再点击该实例,按f9,打开动作面板,在as编辑区输入,如下影片剪辑指令语句:
onClipEvent (enterFrame) { this._rotation = this._rotation - (this.maxconfeteSpeed + 1); if (this._y > Stage.height || this._x > Stage.width || this._x < 0) { this._y = -Math.random() * 50; this._x = Math.random() * Stage.width; } else { this._y = this._y + (this.maxconfeteSpeed + 1); this._x = this._x + (this.vento - 1); } this._alpha = 100; }
锁定该图层。
(3)选择as图层第1帧,按f9,打开动作面板,在as编辑区输入,如下帧语句:
confeteNumber = 25; confeteRoxo = 75; confeteVerde = 100; for (i = 8; i < confeteNumber; i++) { newconfete = mc1.duplicateMovieClip("mc1" + i, i++); newconfete._x = random(195); newconfete._y = -25; newconfete.maxconfeteSpeed = Math.random() * 2; newconfete.vento = random(2); newconfete._xscale = newconfete._yscale = newconfete.alpha = Math.random() * 10 + 60; } for (k = 56; k < confeteRoxo; k++) { newconfete = mc2.duplicateMovieClip("mc2" + k, k++); newconfete._x = random(195); newconfete._y = -25; newconfete.maxconfeteSpeed = Math.random() * 2; newconfete.vento = random(2); newconfete._xscale = newconfete._yscale = newconfete.alpha = Math.random() * 10 + 70; } for (l = 76; l < confeteVerde; l++) { newconfete = mc3.duplicateMovieClip("mc3" + l, l++); newconfete._x = random(195); newconfete._y = -25; newconfete.maxconfeteSpeed = Math.random() * 2; newconfete.vento = random(3); newconfete._xscale = newconfete._yscale = newconfete.alpha = Math.random() * 10 + 65; }
锁定该图层。
6.本作业完成后的时间轴如图10所示:
图10
7.测试存盘
说明:
运用此原理可创作天女散花、天降福禄财、三星高照等特效。
最终效果显示效果:
/Article/UploadFiles/201203/2012031710013770.swf
全屏下载
祝你成功
进入更多教程 |
评论