# HELP WITH DRAWING :) clear(); problem

**URL:** <https://forum.kirupa.com/t/help-with-drawing-clear-problem/123155>\
**Category:** Uncategorized\
**Created:** [September 21, 2004, 12:02am UTC](https://forum.kirupa.com/t/help-with-drawing-clear-problem/123155 "2004-09-21T00:02:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alphaOne](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@alphaOne](https://forum.kirupa.com/u/alphaOne)\
**Post date:** [September 21, 2004, 12:02am UTC](https://forum.kirupa.com/t/help-with-drawing-clear-problem/123155/1 "2004-09-21T00:02:36Z")

</div>

hi, i am experimenting with the drawing methods. I have created this code

\_root.createEmptyMovieClip(“line”, 1);  
drawIT.onPress = function() {  
cool = function () {  
i++;  
with (line) {  
lineStyle(0, 0x000000, 50);  
moveTo(100, 100);  
if (i\<=50) {  
lineTo(100+i, 100+i);  
}  
}  
};  
setInterval(cool, 10);  
};  
clearIT.onPress = function() {  
with (line) {  
clear();  
}  
};

The good news: It actually draws a line from (100,100) to (150,150) and it clears the line when i press the clearIT button…

The bad news: After i press the clearIT button, the drawIT button doesnt draw the line anymore…

So, my question is : How do i bring my line back?..

Thanx in advance,  
alphaOne.
