中易网

如何用flash效果 flash做下雨效果

答案:1  悬赏:80  
解决时间 2021-01-16 08:34
  • 提问者网友:我没有何以琛的痴心不悔
  • 2021-01-15 10:51
如何用flash效果 flash做下雨效果
最佳答案
  • 二级知识专家网友:北城痞子
  • 2021-01-15 11:15
用flash软件制作下雨的动画的方法有两种,一种为代码法,另一种为影片剪辑法。
1、代码法。
(1)用线形工具绘制“雨滴”元件,并命名为rain.
(2)返回至主场景,在第一关键帧插入如下代码:
function begin(mc)
{
mc._x = Stage.width * Math.random();
mc._y = Stage.height * Math.random();
mc._alpha = 5 + 95 * Math.random();
mc._xscale = mc._yscale = 5 + 125 * Math.random();
mc.speed = 4 * Math.random() + 1;
mc.wind = 2 * (Math.random() - Math.random());
} // End of the function
for (i = 0; i < 600; i++)
{
mc = attachMovie("snow", "snow" + i, i);
begin(mc);
mc.onEnterFrame = function ()
{
this._y = this._y + this.speed;
this._x = this._x + this.speed;
if (this._y > Stage.height)
{
this._y = 0;
} // end if
if (this._x > Stage.width)
{
this._x = 0;
} // end if
if (this._x < 0)
{
this._x = Stage.width;
} // end if
};
} // end of for
stop ();
(3)CTRL+ENTER,测试影片效果。
2、影片剪辑法。(略)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息