# Need help on creating MASKING effect

**URL:** <https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411>\
**Category:** Uncategorized\
**Created:** [June 17, 2003, 5:55pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411 "2003-06-17T17:55:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sfactory90cs](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Sfactory90cs](https://forum.kirupa.com/u/Sfactory90cs)\
**Post date:** [June 17, 2003, 5:55pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/1 "2003-06-17T17:55:42Z")

</div>

OK, check out this site:

[http://www.jimmymcgrathphoto.com/](http://www.jimmymcgrathphoto.com/)

can someone please tell me how to be able to control that MASKING effect with my mouse.

I know how to create the actual masking effect on my timeline but I really don’t know the actionsript that will enable my mouse to control the effect. PLEASE HELP!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 6:20pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/2 "2003-06-17T18:20:42Z")

</div>

I have never done dat, but it seems to me u just have to know masking and movie clip dragging. and a little AS.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 7:16pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/3 "2003-06-17T19:16:48Z")

</div>

You basically adapt the method used for the scriptable masks tutorial (here: [http://www.kirupa.com/developer/actionscript/scriptable\_masks.htm](http://www.kirupa.com/developer/actionscript/scriptable_masks.htm)). And hey presto; you now have “that masking effect”.

And fyi, the mouse doesn’t “control” the effect as such. There is a movieclip which acts as the mask and as the mouse is moved around, the mask follows it (from left to right).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 7:19pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/4 "2003-06-17T19:19:03Z")

</div>

Even if you aren’t entirely convinced that the tutorial will help, still give it a go. Trust me, if you understand Flash MX at all, you should have no problem seeing how that effect on the website you linked us to was created once you have followed that tutorial :).

[ps: it’s a very good tutorial even if the author’s interpretation of scriptable masks is a little… twisted ;)]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 18, 2003, 4:59am UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/5 "2003-06-18T04:59:55Z")

</div>

a piece of cake Sfactory90cs… juz create a movieclip and set it as your mask. then, control the movieclip with your mouse. this is basically the script on how you control the clip:

[AS] onClipEvent(enterFrame){  
if (this, hitTest(\_root.\_xmouse, \_root.\_ymouse)){  
\_x = \_root.\_xmouse;  
\_y = \_root.\_ymouse;  
}  
}

```auto

Hope it helps. :)
```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 18, 2003, 7:03pm UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/6 "2003-06-18T19:03:59Z")

</div>

rvanet, when you say to create a movieclip and set it as your mask, do you mean to create the mask alone in my movieclip or to create the mask and the masked picture in my movieclip.

Sorry for all the questions guys, I’m merely an intermediate flash user and still getting the hang of actionscript.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 19, 2003, 2:53am UTC](https://forum.kirupa.com/t/need-help-on-creating-masking-effect/23411/7 "2003-06-19T02:53:10Z")

</div>

first you create your movieclip to be masked. say, “target\_MC”. Put it in the first layer. Then, you create another movieclip and set it as your mask. Put it in layer 2 and name it say “masker”. Make another layer and put this action:

```auto
 target_MC.setMask(masker) 

```

and then follow what i told you above.

Hope it helps. 🙂
