Checking the location of a moving object

David Glasgow david at dvglasgow.wanadoo.co.uk
Mon Jul 19 07:13:39 EDT 2010


Hello folks.

I am proposing to import data which will form a 'freehand' graphic containing about 5,000 data point loc pairs.  I have made a marker to follow the curve using the move command, which works fine.  However, I want the user to be able to select a threshold on the Y axis above and below which graphics change on screen.

I therefore need to check the vertical position of the marker, so I did this:

In the starting button:

on mouseUp
   checkit
   move grc "marker" to the points of graphic "PPG" in 90 seconds
end mouseUp

and in the card script:

on checkit
   put the loc of grc "marker" & "moving  " & the movingcontrols
-- check threshold here
   if the movingcontrols is not empty then send checkit to me in 1 tick
end checkit


I get the first loc for grc "marker" reported in the message box, but that's it.  Is a move completely blocking or am I doing something wrong?

If I can't use move in this way, any suggestions?

Thanks

David Glasgow



More information about the use-livecode mailing list