Hey,
I have made a grid that loads great but I want to add a little flavor by having two events occur:
I want the grid boxes (all duplicates of an mc named “sq”) to rotate either 90, 180, 270 or 360 degrees. The thing is I have written a script to make them rotate 90 degrees with each new duplicate but I realized that doesn’t look as good as what I’m going for. That code is here:
gridx = 31;
gridy = 31;
num = 0;
for (var i = 0; i<20; i++) {
for (var j = 0; j<8; j++) {
sq.duplicateMovieClip("sq"+num, num);
mc = this["sq"+num];
setProperty("mc", _rotation, n);
n = n+90;
mc._x = gridx*i;
mc._y = gridy*j+130;
num++;
}
}
I am trying to get them to randomly change their _rotation to one of the four numbers. I tried an array but got confused how to apply it to a property and gave up.
Ok, that’s effect one. The second is that when they get duplicated into the grid, if there was a way to make them duplicate out of order and one after another (instead of duplicating all at one time). I looked at some setinterval stuff but nothing seemed to be directed to what I was looking for.
Any help is greatly appreciated!