View Full Version : setMask question
pspecial
July 14th, 2003, 03:37 PM
How would one go about masking movie clips that are nested within other movie clips?
Is it even possible??
I have a photo gallery slider type of thingy that loads jpegs with loadMovie into containers. I can mask the entire movie clip but as for the containers,...well I just dont know whats going on here.
ahmed
July 14th, 2003, 03:41 PM
I don't quite get your question, but basically, you can get all your masks inside one movieclip, call that maskMC, and then set that as a mask on the maskeeMC
maskeeMC.setMask(maskMC)
pspecial
July 14th, 2003, 04:42 PM
Funny, I dont quite get your answer.
Are you saying that I can nest masks movie clips within a masked movie clip??
I'll try to make this clearer...
Basically, I need to be able to mask the movie clips that are nested within another movie clip. I can mask the main mc, but all other mc's inside the main mc dont show. I try to mask to the target but that doesnt work either.
pom
July 15th, 2003, 09:52 AM
OK, I didn't understand the questions so well, but basically:
A mask can only mask one target, so if you want to mask several separate clips with the same mask, you'll have to put all the targets inside a container which will be masked.
A target can only have on emask, so if you want that several clips mask the same clip, you'll have to put all your masks inside a container clip that will be set as mask.
That's pretty much as clear as I can be :-\
pspecial
July 15th, 2003, 12:43 PM
Okay, I got it so far.
But there seems to be a problem with the .jpgs that are being loaded in to my container mc which is nested in the mc that holds everything I'd like to mask. I am using LoadMovie method to get the jpgs into the container.
Would this screw up the mask somehow?
mindfriction
July 15th, 2003, 01:05 PM
something like this you mean?
//function which checks that jpg fully loaded into img clip before set this
//mask on the outer clip
outerClip.setMask("myMask");
ie you should have some function which checks that the img container clip has loaded its jpg before you set the mask on the 'outer' clip ...
Anyway if you could post a snippet of your AS it would help.
pspecial
July 15th, 2003, 04:15 PM
Good idea. Here it is:
_root.reel_mc.placeholder1.loadMovie("ka.jpg");
_root.reel_mc.placeholder2.loadMovie("ka.jpg");
_root.reel_mc.placeholder3.loadMovie("ka.jpg");
_root.reel_mc.placeholder4.loadMovie("ka.jpg");
_root.reel_mc.setMask(_root.reelMask);
I also attached an FLA file. You just have to replace "ka.jpg" with a local pic of your to see what I'm talking about.
For the .FLA file I put together a simplified version derived from my website. I started with one cell and it worked fine. But,...as soon as I added more cells, it stopped showing them. Then, I took away the mask, and boom there they are! I just cant figure this one out.
aerahn
July 31st, 2006, 01:31 PM
Did you ever figure out the answer to this? I am having a similar issue...
Good idea. Here it is:
_root.reel_mc.placeholder1.loadMovie("ka.jpg");
_root.reel_mc.placeholder2.loadMovie("ka.jpg");
_root.reel_mc.placeholder3.loadMovie("ka.jpg");
_root.reel_mc.placeholder4.loadMovie("ka.jpg");
_root.reel_mc.setMask(_root.reelMask);
I also attached an FLA file. You just have to replace "ka.jpg" with a local pic of your to see what I'm talking about.
For the .FLA file I put together a simplified version derived from my website. I started with one cell and it worked fine. But,...as soon as I added more cells, it stopped showing them. Then, I took away the mask, and boom there they are! I just cant figure this one out.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.