# Using setMask

**URL:** <https://forum.kirupa.com/t/using-setmask/74569>\
**Category:** flash\
**Created:** [December 30, 2004, 2:53pm UTC](https://forum.kirupa.com/t/using-setmask/74569 "2004-12-30T14:53:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jillymo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jillymo](https://forum.kirupa.com/u/jillymo)\
**Post date:** [December 30, 2004, 2:53pm UTC](https://forum.kirupa.com/t/using-setmask/74569/1 "2004-12-30T14:53:29Z")

</div>

Okay I have searched as much as I think I can search here, and I know this is extremely simple, yet I am stuck on it.

I wanted to try and use setMask with images loaded into my main movie using loadMovie command. I even found this thread here:[http://www.kirupaforum.com/forums/showthread.php?t=78137&highlight=masking](http://www.kirupaforum.com/forums/showthread.php?t=78137&highlight=masking)  
but was having trouble getting that to work, so I am simply attempting to use setMask with a movieclip actually placed on the mainstage of my movie.

I can’t even get this to work!! I have tried several combos including these:  
(the name of the image mc is building and the mask is mask\_mc)

onClipEvent (load) {  
building.setMask(mask\_mc);  
}

onClipEvent (load) {  
building.setMask(\_root.mask\_mc);  
}

onClipEvent (load) {  
\_root.building.setMask(mask\_mc);  
}

When I check the code in Flash it says no errors but when I test the movie I get this message in the output window:

Scene=Scene 1, Layer=actions, Frame=1: Line 2: Unexpected ‘}’ encountered  
}

I don’t get what is happening and I know it is simple.
