# \[FMX\]Masks, Depths, Actions, and Mohicans

**URL:** https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323
**Category:** flash
**Created:** [December 29, 2002, 1:31pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323 "2002-12-29T13:31:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [December 29, 2002, 1:31pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/1 "2002-12-29T13:31:21Z")

</div>

Hey everyone!  
Well, the mohican part doesn’t belong in the title, but it is catchy though :cyclops:

My problem is, I have a movie clip on a layer that is being duplicated from an action in the timeline. Above the layer containing the movie clip, I have placed a funny looking shape that will act as the masking “thing”. I masked both layers.

The problem is, the original, unduplicated movie clip falls under the mask. All the movie clips that have been duplicated appear above the mask layer - thus not falling within the mask area. I have tried messing around with swapDepths, setMask, and even performed a voodoo dance, yet I can not seem to find a way to get all the duplicated movie clips to not go above the mask.

Is there a method to make this work. I am sure the mask is what is causing this problem. If the mask was not there, a simple swapDepths(large\_number) placed on a movie clip would ensure that it stays above any duplicated movie.

I have attached the FLA to this post. Any help or suggestions would be highly appreciated =)

Cheers!  
Kirupa :ub:

---

<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: [December 29, 2002, 2:03pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/2 "2002-12-29T14:03:17Z")

</div>

hey kirupa … is there any reason why you need it masked?

if not why don’t you try something like this?

[size=1]**[EDIT]**  
I forgot something …

> and even performed a voodoo dance

lol 😛 😛 :P[/size]

---

<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: [December 29, 2002, 4:15pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/3 "2002-12-29T16:15:40Z")

</div>

Hey kax!  
Thanks for the help. Your method was my backup plan. This was going to be a tutorial to help people learn how to make random lines move around, and I thought that telling people that method of cutting an outline from a large solid would be too confusing 🙂

Thanks!  
Kirupa :ub:

---

<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: [December 29, 2002, 4:37pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/4 "2002-12-29T16:37:50Z")

</div>

confusing??

I thought about it since I saw your post … you thought about it as your backup … why people would be confused about it?

---

<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: [December 29, 2002, 4:47pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/5 "2002-12-29T16:47:49Z")

</div>

What you would need to do (and this applies to Flash 5 as well) is to put your clip to be duplicated within another clip, then mask that containing clip. Since all duplications are kept in the depth of the clip they are created from, they remain in the container clip which alone never escapes from the mask.

---

<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: [December 29, 2002, 6:10pm UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/6 "2002-12-29T18:10:43Z")

</div>

The setMask method works fine. Just have to keep in mind that each mask can only mask one MC (so you need to duplicate the mask as well as the MC). Check out my attachment. Works like a charm. All actions are in the theLine MC and the \_root timeline. My recommendation is to always keep all of your code in the \_root timeline for ease of portability and editting.

-Al

---

<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: [December 30, 2002, 2:21am UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/7 "2002-12-30T02:21:37Z")

</div>

Thanks al!  
That worked brilliantly =) I’m probably going to make this an open source file with shared credit going to all of you. I think a tutorial on this would be quite repetive of things already viewable on the site =)

Cheers!  
Kirupa :ub:

---

<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: [December 30, 2002, 7:13am UTC](https://forum.kirupa.com/t/fmx-masks-depths-actions-and-mohicans/10323/8 "2002-12-30T07:13:47Z")

</div>

oh!! everything seems so clearly now … I didn’t know that you can’t mask different movie clips with the same mc

thank you very much alethos =)

**kirupa** :  
you don’t need to give me any credit  
after all … alethos solved the problem 😉
