Re: Checking the location of a moving object

2010-07-19 Thread David Glasgow

On 19 Jul 2010, at 4:17 pm,  Alex Tweedly  wrote:

> From:
> Date: 19 July 2010 1:04:05 pm GMT+01:00
> To: use-revolution@lists.runrev.com
> Subject: Re: Checking the location of a moving object
> Reply-To: How to use Revolution 
> 
> 
> No, it's not completely blocking. The problem is that the very first call to 
> checkit is BEFORE the move starts, so the movingcontrols is empty, so the 
> send doesn't happen. Should work (i.e. it does in my simple stack :-)  if you 
> change it to (the equivalent of)
> 
> 

Of course!  (Smacks forehead x 3 with palm.)

Thank you very much Alex.

David Glasgow
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Checking the location of a moving object

2010-07-19 Thread Alex Tweedly
No, it's not completely blocking. The problem is that the very first 
call to checkit is BEFORE the move starts, so the movingcontrols is 
empty, so the send doesn't happen. Should work (i.e. it does in my 
simple stack :-)  if you change it to (the equivalent of)



on mouseUp
   move button "B" to 300,300 in 9 seconds without waiting
   checkit
end mouseUp



Note that you need the "without waiting" in order that the first checkit 
gets done immediately, rather than after the move.



-- Alex.

On 19/07/2010 12:13, David Glasgow wrote:

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
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

   


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Checking the location of a moving object

2010-07-19 Thread Mark Schonewille

David,

I don't understand what you want, but you could always define a path  
instead of two points. Check all points on the path to see whether  
they are within the boundaries. If a point isn't within the  
boundaries, update it. Once you have a correct path, execute the move  
command. You might want to read more about the move command in the  
dictionary.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce

On 19 jul 2010, at 13:13, David Glasgow wrote:


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


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution