PDA

View Full Version : Random, Duplicate, Delay Effect


natedawg007
04-07-2003, 09:22 PM
I have an image that has a mask that will reveal portions of the image until the full image is visible then it stops.

The image is 700 X 50 the mask MC is 10 X 10.

I need to duplicate the mask MC about 350 times. Broken down like this, 5 rows of 70 columns.

I need it to be random to look like a puzzle is being pieced together and it has to have a delay in animation.

I could do this without code but I would end up with about 350 layers or more inside my mask MC.

If anyone can help or guide me in the right direction I would be thankful.

Nate-

pixelwit
04-07-2003, 10:33 PM
Here is my favorite code for generating a grid:var rows = 5;
var cols = 70;
var xSpread = 11;
var ySpread = 11;
for (i=1; i<rows*cols; i++) {
var clip = c.duplicateMovieClip("c"+i, i);
clip._x += (i%cols)*xSpread;
clip._y += Math.floor(i/cols)*ySpread;
}If you combine the above code with this thread (http://www.actionscripts.org/forums/showthread.php3?s=&threadid=25299), you should be able to figure things out.

Hope it helps,

-PiXELWiT
http://www.pixelwit.com

natedawg007
04-07-2003, 10:42 PM
Obi won, my eyes have been open for I shall see clearly now.
I shall use my new found knowledge to help others In their search for truth and light!

Thanks,
Nate-

pixelwit
04-08-2003, 10:28 AM
And so it shall be.

-PiXELWiT
http://www.pixelwit.com