flash 调用 脚本_Flash脚本-瀑布效果

flash 调用 脚本

Download the sample files here.

在此处下载示例文件

1. Import an image of a waterfall into Flash.

1.将瀑布图导入Flash。

2. Set this picture as your background, name it, and lock the layer.

2.将此图片设置为背景,命名并锁定图层。

3. Create a new layer, and name it "waterfall".

3.创建一个新层,并将其命名为“瀑布”。

4. Next, create a small circle with a gradient fill. Convert this to a graphic object, and name it "drop".

4.接下来,创建一个带有渐变填充的小圆圈。 将此转换为图形对象,并将其命名为“ drop”。

5. Convert your "drop" graphic object to a movie clip, and name it "dropmov".

5.将“放置”图形对象转换为影片剪辑,并将其命名为“ dropmov”。

6. In the "dropmov" time line create three key frames. Insert the following action into the first key frame:

6.在“ dropmov”时间轴中,创建三个关键帧。 将以下操作插入第一个关键帧:

pos = _y;

7. In the second key frame, insert this action:

7.在第二个关键帧中,插入以下操作:

_y = _y+2;
if (_y >300)
{
_y = pos;
}

8. Then, in the third key frame, insert:

8.然后,在第三个关键帧中,插入:

gotoAndPlay (2);

9. Now, return to the main time line, and reduce the alpha of the "dropmov" movieclip to 30%. Duplicate the "dropmov" movieclip such that it covers the whole water fall.

9.现在,返回主时间线,并将“ dropmov”动画片段的alpha降低到30%。 复制“ dropmov”影片剪辑,使其覆盖整个瀑布。

Run the movie and you should see the above effect. Well done!

运行电影,您将看到上述效果。 做得好!

翻译自: https://www.sitepoint.com/script-waterfall-effect/

flash 调用 脚本

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值