# More dynamic masking \*sigh

**URL:** <https://forum.kirupa.com/t/more-dynamic-masking-sigh/174245>\
**Category:** Uncategorized\
**Created:** [January 4, 2006, 4:28am UTC](https://forum.kirupa.com/t/more-dynamic-masking-sigh/174245 "2006-01-04T04:28:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [January 4, 2006, 4:28am UTC](https://forum.kirupa.com/t/more-dynamic-masking-sigh/174245/1 "2006-01-04T04:28:54Z")

</div>

Ok so I’m trying to make a navigation system that is loaded from an XML file and has sub menus. Trying to do it ALL in AS. I don’t have any symbols in my library except for the embedded font. Now, sometimes I need to mask something, is it possible to use a dynamically created mc to mask another dynamically created mc dynamically oh, did I forget to say dynamically?? 👁

Ok so let’s use this as an example, two boxes. One orange, one purple.

```auto

mask = createEmptyMovieClip('orange', 1);
mask.moveTo(50,22);
mask.beginFill(0xFF5A00, 100);
mask.lineTo(50,22);
mask.lineTo(50,42);
mask.lineTo(150,42);
mask.lineTo(150,22);
mask.endFill();

maskee = createEmptyMovieClip('purple', 2);
maskee.moveTo(175,22);
maskee.beginFill(0xFF55CC, 100);
maskee.lineTo(175,22);
maskee.lineTo(175,42);
maskee.lineTo(325,42);
maskee.lineTo(325,22);
maskee.endFill();

purple.setMask(orange);

```

I would like the orange one to mask the purple one. Shouldn’t this work? Am I trying to do something impossible? How come nothing shows up when I add the last line in?

[edit]I have been searching the forums and have found no definite answer to this question… Isn’t it a simple question? :trout: [/edit]
