0 Replies Latest reply on Nov 3, 2008 3:00 AM by

    how to clear only current line drawn.

      Hi,
      In my application i am connection two components by drawing a line. i am drawing line by following way;

      -- on mouse down getting starting x ,y and adding listener for mouse move and mouse up.
      -- in mouse move , getting ending x,y coordinate and calling invalidateDisplayList()
      --in updateDisplayList using
      this.moveTo(startX,startY);
      this.lineStyle(1,0x000000);
      this.lineTo(endX,endY);


      things work well when i move mouse straight but when direction is changes a bit the endX,endY chages so different lines are drawn from same starting point to new end points. I want that if i move mouse and line direction changes the previous line should omit and only new line should display.

      Thank you.