# Interesting Masking Problem

**URL:** <https://forum.kirupa.com/t/interesting-masking-problem/103982>\
**Category:** Uncategorized\
**Created:** [March 11, 2004, 7:40am UTC](https://forum.kirupa.com/t/interesting-masking-problem/103982 "2004-03-11T07:40:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twisted357](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@twisted357](https://forum.kirupa.com/u/twisted357)\
**Post date:** [March 11, 2004, 7:40am UTC](https://forum.kirupa.com/t/interesting-masking-problem/103982/1 "2004-03-11T07:40:57Z")

</div>

Hi Flashmonkeys,

Basically what I am trying to do is this:

There is a picture on the stage, now i want the user to be able to uncover another image by basically painting in the mask themselves.

I know how to make a mask follow the mouse around to uncover only a little at a time, but that doesn’t leave a trail of where the mask has been to uncover everything.

I know how to let the user paint black all over the stage, but I dont know how to apply that to a mask layer.

Any help would be greatly appreciated.

Thanks

P.S. This is the code i found to paint black all over the stage, I can’t seem to modify it so it paints on a mask layer. Does anyone else know?

\_root.createEmptyMovieClip(“line”,1);

\_root.onMouseDown = function(){  
line.moveTo(\_xmouse,\_ymouse);  
line.lineStyle(50,0x000000,100);  
this.onMouseMove = function(){  
line.lineTo(\_xmouse,\_ymouse);  
updateAfterEvent();  
}  
}
