Programming | scripts
Click here to download the source file
1. Open Flash, create a movie clip of the shape shown in the figure, and name the movie clip instance "Dna1" in the instance panel
2, create a new layer, we will insert action script on this layer.
3, our idea is to copy this movie clip, and after each copy do a small transfer, and then change again and again.
4. Insert the following action script on the first keyframe:
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. On the second keyframe, insert the following action:
for (i=2 i < i = i+1)
{SetProperty ("/dna" Add I, _rotation, GetProperty ("/dna")
Add I, _rotation) + 5);
}
6. On the third keyframe, insert the following action:
gotoAndPlay (2);
7, debug the film, you can get the effect of the above see.