# Removing lineStyle on press?

**URL:** <https://forum.kirupa.com/t/removing-linestyle-on-press/259324>\
**Category:** Uncategorized\
**Created:** [May 3, 2008, 1:20pm UTC](https://forum.kirupa.com/t/removing-linestyle-on-press/259324 "2008-05-03T13:20:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yossarian](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@yossarian](https://forum.kirupa.com/u/yossarian)\
**Post date:** [May 3, 2008, 1:20pm UTC](https://forum.kirupa.com/t/removing-linestyle-on-press/259324/1 "2008-05-03T13:20:37Z")

</div>

Hi,

I’m using duplicateMovieClip and each time the user drags a second one a line connects the two clips together. I have also added a removeMovieClip so users can get rid of a clip should it be in the way. However, this does not remove the lineStyle. How can I do that, please? Code is below:

```auto
xlocs=new Array()
function drawlines(dragged_mc)
{    
    for(n=0;n<xlocs.length;n++)
    {
    if(xlocs[n][2]==dragged_mc){xlocs[n][0]=Math.round(dragged_mc._x+100);xlocs[n][1]=Math.round(dragged_mc._y)}
    }
    xlocs.sort(Array.NUMERIC)
    bounce=100;
    drawthem()
}

bounce=100
thetoggle=1
function drawthem()
{
    for(n=0;n<(xlocs.length-1);n++)
    {
    this.createEmptyMovieClip("canvas_mc"+n, n+100);
    _root["canvas_mc"+n].lineStyle(1, 0x000000, 100);
    _root["canvas_mc"+n].moveTo(xlocs[n][0]-100, xlocs[n][1]);
    //_root["canvas_mc"+n].lineTo(xlocs[n+1][0]-100, xlocs[n+1][1]); 

    if(xlocs[n+1][0] != 999){_root["canvas_mc"+n].curveTo((xlocs[n+1][0]-100)-(bounce*thetoggle), (xlocs[n+1][1])-(bounce*thetoggle),xlocs[n+1][0]-100, xlocs[n+1][1]);}
    }
    
    circle1._x - circle1.stringVib, circle1._y - circle1.stringVib, circle1._x, circle1._y
}

```
