# Simple mask doesn't mask!

**URL:** <https://forum.kirupa.com/t/simple-mask-doesnt-mask/328933>\
**Category:** Uncategorized\
**Created:** [July 3, 2012, 8:00pm UTC](https://forum.kirupa.com/t/simple-mask-doesnt-mask/328933 "2012-07-03T20:00:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![captsig](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@captsig](https://forum.kirupa.com/u/captsig)\
**Post date:** [July 3, 2012, 8:00pm UTC](https://forum.kirupa.com/t/simple-mask-doesnt-mask/328933/1 "2012-07-03T20:00:24Z")

</div>

Hi everyone…just joined the forum. I’m trying to learn more Actionscript and I have a very simple program that is not working. My ultimate goal is to manipulate a mask so I can impart movement to it so it reveals in a eyecatching way.  
But, for starters, I can’t get my very simple program to run.

I have three elements in the library; a background picture, a picture to be masked, and a square graphic about 50px by 50px which is to serve as the mask; all are typed MovieClips and have a linkage class matching their symbol names.

Here is my Actionscript code:

/\*instantiate the movieclip classes \*/  
var bk1:MovieClip = new backgrd();  
var pic1:MovieClip = new picture();  
var mask1:MovieClip = new squaremask();  
/\*specify positioning \*/  
bk1.x = 275;  
bk1.y = 200;  
pic1.x = 275;  
pic1.y = 200;  
mask1.x = 275;  
mask1.y = 200;

/\*add them to the display list \*/  
addChild(pic1);  
addChild(bk1);  
addChild(mask1);  
pic1.mask = mask1;

When I test my fla file, all I see is the background image; there should be a square in the middle that is revealing the targeted picture-be-masked, in this case, pic1.

Would appreciate any help.

captsig
