I have a simple function that I thought would allow me to draw a line and then allow me to move the touch position to move one end of the line.
However I seem to get lots of lines on the screen as the remove does not appear to be working, any help would be appreciated.
local function onBack( event )
if ( myLine ) then
myLine.parent:remove( myLine ) – erase previous line, if any
end
myline = display.newLine( 50,50, event.x,event.y )
myline:setColor( 255, 0, 0 )
myline.width = 3
end [import]uid: 7830 topic_id: 7090 reply_id: 307090[/import]