How to draw a line

I want to make a game that involves drawing a line so a ball will go down the line. How do i write code to make a line? Thank you. [import]uid: 23689 topic_id: 7937 reply_id: 307937[/import]

I assume you want the user to draw the line, correct?

I knew it! This should probably get you what you want:

http://developer.anscamobile.com/code/martian-control [import]uid: 5317 topic_id: 7937 reply_id: 28248[/import]

re: drawing a line
store the touch points in a table in the “moved” phase. meanwhile, during every enterframe remove & redraw the line between the points.

this is the technique suggested by ansca. you might think you would just :append to the line every time you process a touch “moved” but this is not the method that works.

http://developer.anscamobile.com/forum/2010/12/15/displaylineappend-doesnt-work-realtime-unless-linewidth-set-eg-linewidth00000001

however as for physics on the line i’m not sure. [import]uid: 6645 topic_id: 7937 reply_id: 28277[/import]