Hey guys…I just recently tried to get to grips with Flash’s Drawing API, so I could draw dynamically, which I always thought would be cool
Heh, but anyway, after reading Poms tute on it, I decided (as you do) to advance on what he covered, in this case it went wrong Using this code:
_root.createEmptyMovieClip("line",1);
line.lineStyle(2,0x000000,100);
line.moveTo(point1._x,point1._y);
_root.onEnterFrame = function () {
line.lineTo(point2._x,point2._y);
line.lineTo(point1._x,point1._y);
}
and two movieclips called point1, and point2, which are moving, I wanted a line to be between them continuously and thought the above code would work…WRONG!
This creates a line each frame and as the two mc’s move a new line is placed, albeit this made a fairly cool effect (kinda like a curve with straight lines) but it wasn’t the effect I was after, so I’m thinking I need to delete the previous line each frame, how would I go about doing this?