Effects
Demo Effect:
Click here to download the source file
Production steps:
1. launch Flash MX 2004, create a new flash document, modify the movie size to 300x300, frame rate: 30fps. As shown in figure:
2. Click the File menu-->> "import"-->> "Import to Library" command to import a picture footage of a prepared 300*300. As shown in figure:
3. Click the Insert-->> new Symbol command (or press CTRL+F8) to create a new symbol named BG, behavior: Movie clip, click OK button. As shown in figure:
4. Open the Library panel, drag the picture just imported to BG, and adjust its coordinates to: 0, 0. The following figure:
5. Create a new component, named Nemo, behavior is a movie clip, click OK button, then add a layer, select Layer 2 frame 1th, open the Action panel to add code: Stop (), in layer 1 of frame 2nd insert a keyframe, and then select the Rectangle tool to draw a size of 20* 20 of the unbounded rectangle, adjusting its coordinates to 320,320. Then insert a keyframe at frame 35th of Layer 1, insert a keyframe at the 15th frame of layer 1, insert a keyframe at the 35th frame of Layer 2, and set the action command to: Stop ();. and adjust the position of Layer 1 at frame 15th and 35. The following figure:
8. After selecting Layer 1 's 2nd frame, open the property panel, set the tween as: shape, easy to adjust to 100; Also select layer 1 frame 15th to open the properties panel set the tween to: shape, easy to adjust to-100. The following figure:
9. Create a new component named movie, drag the newly created movie clip inside to set its instance name: Meno. As shown in figure:
10. Back to the scene, new two layers, respectively, the layer 1 renamed to BG, Layer 2 renamed: Movie, Layer 3 renamed action. Select the BG layer's 1th frame, open the library panel to drag the BG movie clip into the inside, and set its instance name IMG, as shown below:
Select the 1th frame of the movie layer and drag the movie movie clip inside to set its instance named Mov. As shown in figure:
Select the action layer 1th frame, open the action panel, we add the following code: (Here the code I do not explain, I hope you can read):
Znum = 0;
_root.img.setmask (_root.mov)
Allz = new Array ();
Allz[0] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
ALLZ[1] = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
ALLZ[2] = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
ALLZ[3] = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
ALLZ[4] = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19];
ALLZ[5] = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
ALLZ[6] = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21];
ALLZ[7] = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22];
ALLZ[8] = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
ALLZ[9] = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24];
ALLZ[10] = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
ALLZ[11] = [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26];
ALLZ[12] = [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27];
ALLZ[13] = [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
ALLZ[14] = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29];
For (i=0 i<15; i++) {
For (j=0 j<15; j + +) {
_root.mov.nemo.duplicatemovieclip ("M" + (I-1) *15+j, (i-1) *15+j);
_root.mov["M" + (i-1) *15+j].xnum = i;
_root.mov["M" + (i-1) *15+j].ynum = j;
_root.mov["M" + (i-1) *15+j]._x = i*20+20;
_root.mov["M" + (i-1) *15+j]._y = j*20+20;
_root.mov["M" + (i-1) *15+j].onenterframe = function () {
if (_root.allz[this.ynum][this.xnum] = = _root.znum) {
This.play ();
}
};
}
}
_root.onenterframe = function () {
if (znum<30) {
_root.znum++;
}
};
Press CTRL + ENTER to see the effect! Good luck!!!!