Measures On Two Clicks

Hi ther all of you…

Does any one got any idea how to do something like…

Imagine you got a picture of a golf course and the user likes to know the distance from one point to another!

Can it be like… when the user cliks once (starting point) then drag the cursor to any direction on the image (can a line be drawn from the sarting point to the mouse position) when the cursos is in movement the distance has to be updated in a text field.

Another thing is that at the beggining I have to setup the scale of the image, no?.. for example how to convert pixels to yards, since the distance information that the user gets have to be in yards…

ANY IDEA!!! :A+:

to get the line drawn you could set a variable called xclick and yclick, and then use the drawing api to draw between that and xmouse and ymouse… too do the scaling you could simply do the math, like yard_distance=distance*1.3; and then append yards to the end of that value… oh and to make sure it stops on release, you could have the drawing api stuff in an onclick function, and then delete that on an onrelease function :wink:

Ok, let me do some experiments… Thanks BP

np :wink: