First, import an image into the scene and convert it into a video clip.
The first shot of video editing in the main scenario
Write the following
Onclipevent (load) // when a video clip appears on the timeline, execute the statement in braces {
Numy = 56;
Numy = 70; // defines the size of the image display.
Numperframe = 60 // define the needle speed
Currsquare = 0;
Choices = new array ();
For (I = 0; I <numx * numy; I ++ ){
Choices. Push (I); // defines a new array and increases the length of the array.
}
_ Root. createemptymovieclip ("Mask", 0 );//
This. setmask (_ root. Mask); // creates a video clip as a shadow.
Function drawsquare (x, y ){
With (_ root. Mask ){
MoveTo (x, y );
Beginfill (0x000088 );
Lineto (x + 10, y );
Lineto (x + 10, Y + 10 );
Lineto (X, Y + 10 );
Endfill (); // draw this screen, which is a 10*10 pixel square.
}
}
}
Onclipevent (enterframe) // video clip pin frequency continuously triggers this action {
If (currsquare <numx * numy ){
For (I = 0; I <numperframe; I ++ ){
J = random (choices. Length );
T = choices [J];
Choices [J] = choices [choices. Length-1]
Choices. Pop (); // start to delete elements in the array choices
X = T % numx;
Y = math. Floor (T/numx); // return the lower limit of the expression in the Parameter
Drawsquare (x * 10, y * 10 );
}
Currsquare + = numperframe;
This. _ alpha = currsquare/(numx * numy) * 100; // sets the transparency.
}
}
Now you can export the results.