# Using whatever lineTo(); draws as a mask

**URL:** <https://forum.kirupa.com/t/using-whatever-lineto-draws-as-a-mask/146341>\
**Category:** Uncategorized\
**Created:** [April 30, 2005, 4:56am UTC](https://forum.kirupa.com/t/using-whatever-lineto-draws-as-a-mask/146341 "2005-04-30T04:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [April 30, 2005, 4:56am UTC](https://forum.kirupa.com/t/using-whatever-lineto-draws-as-a-mask/146341/1 "2005-04-30T04:56:14Z")

</div>

How’s it going fellow kfians. The effect I would like to create is as follows: I have an image movieclip named “myImage\_mc”, and I want to create a spray paint effect, where the user “paints” whatever myImage\_mc is using the lineTo and lineStyle commands. I have the lineTo stuff all done, the problem i have is trying to make whatever the user draws a mask that shows the image.

Here’s my code so far:

```auto
this.onLoad = function() {
    _root.createEmptyMovieClip("empty_mc", this);
};
this.onMouseDown = function() {
    empty_mc.moveTo(_root._xmouse, _root._ymouse);
    drawIt = "true";
};
this.onMouseUp = function() {
    drawIt = "false";
};
this.onEnterFrame = function() {
    if (drawIt eq "true") {
        empty_mc.lineStyle(65, 0x000000, 100);
        empty_mc.lineTo(_root._xmouse, _root._ymouse);
    }
};

```

The movie is set up pretty basically so far, two layers, top one contains the above as, and the bottom one contains the image movieclip named myImage\_mc. Any ideas? is this even possible?
