More dynamic masking *sigh

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?? :eye:

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


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]