# Using setMask dynamically cause displaying problem

**URL:** <https://forum.kirupa.com/t/using-setmask-dynamically-cause-displaying-problem/296463>\
**Category:** Uncategorized\
**Created:** [September 15, 2009, 10:00am UTC](https://forum.kirupa.com/t/using-setmask-dynamically-cause-displaying-problem/296463 "2009-09-15T10:00:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![annielhy](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@annielhy](https://forum.kirupa.com/u/annielhy)\
**Post date:** [September 15, 2009, 10:00am UTC](https://forum.kirupa.com/t/using-setmask-dynamically-cause-displaying-problem/296463/1 "2009-09-15T10:00:48Z")

</div>

I have a movieclip and there is a “mask movieclip” within it.

In my code, I need to switch between mask and no mask to add other movieclip by drag and drop:

themovieclip.setMask(null);  
themovieclip.setMask(themovieclip.mask\_mc);

Problem: The mask works but it looks very ugly. If I refresh my flash player (e.g. resize or minimize/restore the player), the mask will look ok.

I assume that it is graphic-drawing/displaying problem. Does anyone know how to solve it?

Thanks!!!
