# Dynamic Masks?

**URL:** <https://forum.kirupa.com/t/dynamic-masks/262084>\
**Category:** flash\
**Created:** [June 3, 2008, 6:35am UTC](https://forum.kirupa.com/t/dynamic-masks/262084 "2008-06-03T06:35:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RyanBP](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@RyanBP](https://forum.kirupa.com/u/RyanBP)\
**Post date:** [June 3, 2008, 6:35am UTC](https://forum.kirupa.com/t/dynamic-masks/262084/1 "2008-06-03T06:35:55Z")

</div>

Hi. I have a project that needs to work like a scratch card. I’ve sorted out the scratch card bit where the user clicks ands scratches off the “foil” to reveal what’s underneath using a dynamic mask with createNewMovieclip() and setMask(), drawing rectangles over each other in the new mask movieclip. What I need to know: is there any way for me to automatically continue the program once the entire image is revealed by the mask? Basically, once the user has scratched off all the foil?

Shot

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 3, 2008, 5:57pm UTC](https://forum.kirupa.com/t/dynamic-masks/262084/2 "2008-06-03T17:57:16Z")

</div>

You could use the bitmapData class to check and see how many of the pixels are transparent… hrm. I’m sure there’s a better way to do that, but that’s the only thing that occurs to me off the top of my head.

---

<div class="post-metadata">

**Author:** ![RyanBP](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@RyanBP](https://forum.kirupa.com/u/RyanBP)\
**Post date:** [June 4, 2008, 5:25am UTC](https://forum.kirupa.com/t/dynamic-masks/262084/3 "2008-06-04T05:25:33Z")

</div>

Thanks guy. I’ll give it a bash.
