Pointlist from move command?
michael-kristensen at dsa-net.dk
Wed Jun 30 02:48:58 CDT 2010
Hi and thanks for replies
> I dunno: if you have an object moving round a polygon (or along a
> pathway for that matter),
> surely all you have to do is poll the object's position every 2 ticks
> and pop the results into the lines
> of a field?
I did try that but it seams that the move command is not threaded and
can not handle other commands while executing.
> Hi Mic,
> if you mean that instead of the corner points of a polygon you want
> all the
> intermediate points also then this came up on the forum a while ago
> and I
> uploaded a little stack to the forum that does this.
> look for the attachement
> calculate points of polygon.rev.zip
> (I did not have any real use for all the points but once I had a
> graphic I
> "pulled" out some points and animated them when one moves the
> graphic, since
> it looked like a bug that is what I called it :) )
> as revlet:
That was just what I needed.
Yet there is a but...
I put this script in the left polygon and I made it none-opaque:
put the mouseLoc into x
repeat with i = 1 to number of lines of fld fAllPoints
if x = line i of fld fAllPoints then
put "M " & the mouseLoc
The beep gives me audio feedback that I clicked the graphic
In the majority of times the Loc came out with an M in front of it
meaning that the mouseLoc was not on the pointList
So what Rev considers ON the graphic is different from your pointlist.
Tried to replace TRUNC with ROUND in your script, with same result
More information about the use-livecode