Multiple Mask and Random Image

I hope someone can give me a hand on this.

I am doing a multiple mask where an image is being masked by multiple little squares that drop down.

I created 2 layers, mask and masked for each square and image.

That part works fine, however, I wanted to load a different image everytime when the page loads, I used the example on this site:

choice = Math.round(Math.random()*6);
switch (choice) {
case 0 :
location.loadMovie(“image0.swf”);
break;
case 1 :
location.loadMovie(“image1.swf”);
break;

}

Now, every little square load a random image instead of all loading the same image. Is it possible to ask all other masked layer to call on that one random image? What should I do?

i’m having a hard time understanding what you’re trying to say so if you could post an fla that would help a bit.

are you masking multiple images with multiple squares or squares on separate layers that mask the same image on different layers? not exactly sure what you’re saying…

I am doing a multiple masking on one image.

The way I do this multiple masking is by creating 2 layers for each mask: mask and masked layer.

I also want to generate a random masked image everytime it loads.

With the code I used above, each masking layer (mask and masked), I inserted the code for the masked layer. So, the effect I want is a multiple mask on a random image.

But the result is random image for each mask with the current setup.

But I want each mask to call the same random image.

How do I achieve that?

Another way of saying this is, can all masked layers call to one random image?

Wow, this must be harder than I though…no one can help me?

Think you would be better using movieclips and setMask()
mc.setMask(mask_mc)
to remove
mc.setMask(null)

put all your little squares into 1 mc

First of all, thanks for your help. However, I am a ameture in Flash, all I know is doing little animations. Do you mind telling me more about what you just posted?

Anyone?

if you search these forums, there are tons of examples of masking with script but you really need to look up setMask() and get the basics.