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](https://i-blog.csdnimg.cn/blog_migrate/ff8bd7f3d0f69bc8043e6dd4334f9b66.gif)
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.播放电影:您将获得上面显示的效果!
flash 调用 脚本