|
For
assigning action to make dynamic grids:
22.
Add a new layer on top of square layer and name it as actions
23.
Select the layer actions and on frame 1 of that
layer give the following action in the action window:
24. Choose
Windows > Actions
//Variable
xgridlines is defined for number of grid lines on x axis//
xgridlines = 11;
//Variable
ygridlines is defined for number of grid lines on y axis//
ygridlines = 21;
//Variable
distance is defined for the distance between each grid //
distance = 30;
//
set property function is used to make the square movieclip
invisible //
setProperty ("square", _visible, false);
//
Variable k is used in the forloop given below for giving
different instance name to the duplicated movieclips //
k = 0;
//
Making a nested forloop for duplicating the square movieclip
/
| for
(j=1; j<=xgridlines-1; j++)
{ |
|
for
(i=1; i<=ygridlines-1; i++)
{ |
|
|
//
duplicating the square movieclip //
duplicateMovieClip ("square",
"square"+k, k);
// setting the x position of the
duplicated square movieclips //
setProperty
("square"+k, _x,
distance*i);
// setting the y position of the
duplicated square movieclips //
setProperty ("square"+k,
_y,
distance*j);
// incrementing the value of k
//
k++; |
|
} |
| } |
|
 |
For
Placing the grid movieclip at proper position in the movie:
25.
Choose Window > Panels > Scene
26.
Select Scene 1 from the scene window
27. Select the grid movieclip which is there
in the scene
28.
Choose Windows > Panels > Info
29. From the info panel set x = -15 and y
= -15
30.
Choose Control > Test Movie
|

Regards,
Piyush
Chheda
All accompanying logos, brands
and product names are trademarks of their respective
companies.
|
|