Why don't duplicated mc's mask my background?

hej peeps,

as being a newbie on flash i have a question about this mask
i’m trying to make …

i duplicated a mc to mask my background (the mask is a bunch of moving blocks) but when i play the flash preview
my mc’s are duplicated and moving but they only mask my background one at a time.

please help me out …

i added the .fla … thnx in advance :smiley:

lat0rrrrrrrr

hmm … seems i can’t attach the .fla ( i get msg thread is to big :frowning:
so i will post the actionscript code i used :

i=1;
while i<30 {
i=i+1;
_root.block.duplicateMovieClip"newBlock"+i, i;
_root[“newBlock”+i]._x = random700;
_root[“newBlock”+i]._y = random400;
_root.block._visible = false;

}
bg.setMask"newBlock"+i;

Hi,

Something can only be masked by one MC at a time.

The way around it is to include your original MC (and with it its duplications) into a parent MC, wich is the one that u use to mask the bg.

Hope it makes sense to you.

Cheers

SHO

Hej …

thnx for the tip … only it makes no sense whatsoever to me :frowning:

mebbe u can xplain a bit more … or is there a tutorial on the subject ??

Hi,

OK the thing is that your bg can only be masked by one Movie Clip at one given time and you are trying to mask it (bg) with several clips (the duplications of block) at the same time.
Is that right?

So what you want to do is duplicate a Movie Clip (block) that resides ‘inside’ another Movie Clip(lets call it ‘holder’). This way, by setting ‘holder’ as you mask (with all the duplications of block
‘inside’) all the duplications of block will mask bg at the same time.

Hope this is clearer (sorry, english is not my first language)

Cheers

SHO

hmmm … i think i understand what you’re trying to say but i still don’t really get it.

I tried making a movieclip which contains the duplicates
and mask my background with it …
only when i play a preview now i see just one block masking my background without moving.

doesn’t the actionscript work within a movieclip ?

can you maybe give me an example on how i can accomplish this ?

thnx in advance

Odin

Hi,

I think this file does what you want.

Cheers

SHO