# Masking in AS2

**URL:** https://forum.kirupa.com/t/masking-in-as2/266107
**Category:** flash
**Created:** [July 16, 2008, 11:22am UTC](https://forum.kirupa.com/t/masking-in-as2/266107 "2008-07-16T11:22:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [July 16, 2008, 11:22am UTC](https://forum.kirupa.com/t/masking-in-as2/266107/1 "2008-07-16T11:22:16Z")

</div>

This masking code doesn’t work. Why is this? The variables such as test.jpg is saved in the right place and ‘mask’ is labeled for export etc… can anyone help - it should be as easy as pie. In fact it should work the way Ive done it no!?

```auto
function maskit()
{
    content_mc.cframe.loadMovie("test.jpg");
    content_mc.attachMovie("mask","mask",1);
    content_mc.mask.setMask(content_mc.cframe);    
}
maskit();

```

Thanks!👁
