# Incremental line that advances and retreats?

**URL:** <https://forum.kirupa.com/t/incremental-line-that-advances-and-retreats/228107>\
**Category:** flash\
**Created:** [June 5, 2007, 1:10pm UTC](https://forum.kirupa.com/t/incremental-line-that-advances-and-retreats/228107 "2007-06-05T13:10:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gip3d](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gip3d](https://forum.kirupa.com/u/gip3d)\
**Post date:** [June 5, 2007, 1:10pm UTC](https://forum.kirupa.com/t/incremental-line-that-advances-and-retreats/228107/1 "2007-06-05T13:10:49Z")

</div>

Making a line chart with 20 increments that draws itself across the screen as the user drags an icon.

Works great using lineTo as the user moves the icon to the right.

But I do not see a method to get the line to disappear step by step as the user drags the icon the opposite way, to the left.

I could always animate with a non-actionscript line, using a mask that moves left and right, but I was hoping there was some actionscript command that could clear the previous segment of the line drawn, without having to redraw the entire line. clear(); gets rid of the entire line, not individual segments.
