Replacing an MC which is masked

Hello Gurus,

Today, I am wondering how (or if it is possible) to replace a movieclip which is masked.

i.e. I have one movieclip which I want to “wipe” with another movieclip (which contains the same object but in a different colour (photo)). The colour is dependent upon which button is clicked. So…it would be nice to have a transition movie clip which will take the current colour MC and “wipe” it with the select colour MC.

Hope this makes sense…and thanks in advance.


Why not have a movieclip with all the coloured photos in it, and upon button press go to the corresponding frame within that movieclip that shows that specific coloured photo, and then do your mask animation on that movieclip ? I’m not sure if I’m getting your situation correctly, but it looks to me like an excellent way to ‘replace’ a masked movieclip.

true…though perhaps I didn’t explain well…

the reason (that I can see) for not using this method is the transition would need to go from any colour to any colour. so a hard-copy version would be tricky work to add to and manage.

if I have misundertsood your suggestion please re-word (if you can be bothered) and forgive my tiredness. :wink:

anymore help?

So you basically have a photo with a specific colour, and then a mask animation, over another photo with another colour so that the first photo reveals the other photo with the other colour ?

yes, but the pic which is wiped in is random then that has to replace the original so the process can begin again. it’s all random though except for the initial colour object

Yes, I see … let me create something for you.


Is this what you were looking for ?

ooooer…yeah looks beauty bonza mate!! do you mind commenting the code or explain here?

at least then I don’t have to post in a few months with more annoying questions which I may have learnt from this question.

actually I thinks I get it. mostly


while (colors[maskedRND] == maskF) {
	var maskedRND = 1+random(5);

Ah yes, that’s to make sure that the masked movieclip doesn’t get the same colour as the mask. It basically checks if the colour associated with the random number is the same as the colour of the mask, and if so, change rnd to another random number until it isn’t the same.

ahhhh. you are a star. thanks heaps

No problem :slight_smile:


I’m trying to convert the fla from yesterday to work on button click
if the “blue” button is clicked the blue frame will wipe in over the current color. I think I’m getting there, but if you get online before I can post how far I get can you word me up on how to achieve this?

here’s what I got so far

The thing I can;t get working now is if the color is the same as the current then don’t play.

any help greatly appreciated

I couldn’t upload the file I had which had the bitmaps in place.
In the bitmap version there is a flash of the color that is to be wiped in prior to the wipe beggining.

have included images too.

hope this makes sense as it’s the end of another long day and I am knackered

or anyone?

What’s the problem ? I’m kinda confused by the file you attached.

sorry Voetsjoeba.

I’m trying to make the change (“wipe”) happen on mouse click (so if they click the green buttin, the green MC is wiped on) the file is confusing I guess because I don’t know what I’m really doing. :smiley: