In Flash, some people often bother to copy multiple components, often with paste and copy. I felt so much trouble, so I wrote down about some copy components as. Hope to bring you feelings.
var i=1, set Variable ...
Onenterframe=function () {
Duplicatemovieclip ("MC", "MC" +i,i);//Copy Component MC, where "MC" +i, is the new name.
SetProperty ("MC" +i,_x,random (500))//Change the copied component properties, _x, is the x axis, 500 is wide, is from 0-500, there are copied components appear. Random is a random meaning.
SetProperty ("MC" +i,_y,random (400));/Ibid., just changed the axial direction.
i++;//This is related to the following condition, that is, when I is less than 100, the above copy is executed continuously.
if (i>=100) {
i=1;//and if this is greater than or equal to 100, I will be equal to 1, that is, it will copy no more than 100 components.
}
}
Complete.. Oh as long as you know the meaning of the function, so it is not difficult ...
To miss the Unicorn and left.