# Drawing API clear() prob

**URL:** <https://forum.kirupa.com/t/drawing-api-clear-prob/251726>\
**Category:** flash\
**Created:** [February 12, 2008, 1:55am UTC](https://forum.kirupa.com/t/drawing-api-clear-prob/251726 "2008-02-12T01:55:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarumitai](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sarumitai](https://forum.kirupa.com/u/sarumitai)\
**Post date:** [February 12, 2008, 1:55am UTC](https://forum.kirupa.com/t/drawing-api-clear-prob/251726/1 "2008-02-12T01:55:58Z")

</div>

I’m having trouble with clearing old drawn lines. When I have mc.clear() in the onEnterFrame there is no line drawn. When I leave it out, all the previous lines remain. I don’t know where to put it.

I’m trying to make a swf where there’s a pole and when you click the pole a line follows your mouse. When you then click on something floating around, the line is connected from the pole to the floating thing. That was technical talk.

[AS]

this.createEmptyMovieClip(“dragger”,1);  
this.onEnterFrame = function()  
{  
dragger.lineStyle(2,0x000000,100);  
dragger.moveTo(pole.\_x,pole.\_y);  
dragger.lineTo(\_xmouse,\_ymouse);  
[//dragger.clear](https://dragger.clear)(); // with it on there’s nothing on the stage  
// with it off there are copies of old lines everywhere  
}  
updateAfterEvent;  
[/AS]

The only thing on the stage is a line called ‘pole’.

Any idea what I am doing wrong?
