flash 调用 脚本_Flash脚本-DNA双螺旋

flash 调用 脚本

Download the sample files here.

在此处下载示例文件

1. Create a movieclip from an object as shown below. Give it a instance name "dna1".

1.从一个对象创建一个动画片段,如下所示。 给它指定一个实例名称“ dna1”。

1068_tool2

2. Create a new layer. We will insert the actions into this layer.

2.创建一个新层。 我们将动作插入这一层。

3. The idea is to dulicate the movieclip with a little diversion each time, then apply that diversion again and again.

3.想法是每次将动画片段都稍微转移一下,然后将其转移一次又一次。

4. In the first keyframe insert the action:

4.在第一个关键帧中插入操作:

for (i=2; i<30; i=i+1)
{  
duplicateMovieClip ("/dna1", "dna" add (i), i);  
setProperty ("/dna" add i, _rotation, getProperty("/dna"  
add (i-1), _rotation)+11);  
setProperty ("/dna" add i, _x, getProperty("/dna"  
add (i-1), _x)+10);  
}  
setProperty ("/dna1", _visible, "0");

5. In the second keyframe, insert the action:

5.在第二个关键帧中,插入操作:

for(i=2; i < 30; i = i+1)
{ setProperty ("/dna" add i, _rotation, getProperty("/dna"  
add i, _rotation) + 5);  
}

6. In the third keyframe use the action

6.在第三个关键帧中使用操作

gotoAndPlay (2);

7. Play the movie: you will get the effect shown above!

7.播放电影:您将获得上面显示的效果!

翻译自: https://www.sitepoint.com/script-dna-double-helix/

flash 调用 脚本

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值