# setMask question

**URL:** https://forum.kirupa.com/t/setmask-question/25591
**Category:** Uncategorized
**Created:** [July 14, 2003, 7:37pm UTC](https://forum.kirupa.com/t/setmask-question/25591 "2003-07-14T19:37:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![pspecial](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pspecial](https://forum.kirupa.com/u/pspecial)
#### Post date: [July 14, 2003, 7:37pm UTC](https://forum.kirupa.com/t/setmask-question/25591/1 "2003-07-14T19:37:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 14, 2003, 7:41pm UTC](https://forum.kirupa.com/t/setmask-question/25591/2 "2003-07-14T19:41:13Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 14, 2003, 8:42pm UTC](https://forum.kirupa.com/t/setmask-question/25591/3 "2003-07-14T20:42:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 15, 2003, 1:52pm UTC](https://forum.kirupa.com/t/setmask-question/25591/4 "2003-07-15T13:52:07Z")

</div>

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 :-\

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 15, 2003, 4:43pm UTC](https://forum.kirupa.com/t/setmask-question/25591/5 "2003-07-15T16:43:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 15, 2003, 5:05pm UTC](https://forum.kirupa.com/t/setmask-question/25591/6 "2003-07-15T17:05:02Z")

</div>

something like this you mean?

```auto

//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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 15, 2003, 8:15pm UTC](https://forum.kirupa.com/t/setmask-question/25591/7 "2003-07-15T20:15:53Z")

</div>

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.
