Pointlist from move command?

Geoff Canyon Rev gcanyon+rev at gmail.com
Mon Jul 5 00:33:44 CDT 2010


I wouldn't recommend the polling solution, but if you want to go with
that, add "without waiting" and you'll be able to get the moving
object's position as it moves.

On Wed, Jun 30, 2010 at 2:48 AM, Michael Kristensen
<michael-kristensen at dsa-net.dk> wrote:
> 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.
>> See:
>>
>> http://forums.runrev.com/phpBB2/viewtopic.php?f=9&t=5191&p=23366&hilit=points+of+polygon#p23366
>> 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:
>> http://berndniggemann.on-rev.com/bug/
>
>
> Thanks Bernd
>
> 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:
>
> on mouseUp
>   beep
>   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 x
>         exit repeat
>      else
>         put "M " & the mouseLoc
>      end if
>   end repeat
>
> end mouseUp
>
>
> 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
>
> Mic
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list