Drag n Drop Objects in Flash vs. Rev

Jim Hurley jhurley at infostations.com
Thu Dec 4 13:20:43 EST 2003

>On 12/4/03 6:11 AM, "Jim Hurley" <jhurley at infostations.com> wrote:
>>  Is there a way to simulate:
>  >  Repeat until the mouseClick
>  > without monopolizing the CPU?
>>  This repeat loop is useful when you want the user to be able to click
>>  the mouse to stop or interrupt screen activity.
>You might try the following.  In your message box, type:
>   go url "http://www.tactilemedia.com/download/clickdetector.rev"
>As Jacque stated, and more importantly, as the creators of the engine have
>stated, the combination of a repeat loop and polling the mouse is
>inefficient for their engine.  So better to use mouseMove, variable states,
>and "send in...".
>Scott Rossi
>Creative Director
>Tactile Media, Multimedia & Design
>E: scott at tactilemedia.com
>W: http://www.tactilemedia.com

Thanks Scott. You example using the custom property (uClickTrap) was 
very clear.

In my case the user initiated the script by clicking on a button and 
would click anywhere on the card to stop the script. Your script 
works for this case as well, if I just put the script to reset the 
uClickTrap into the card script.

But for quick and dirty, I follow Jacque's example (a following 
message) and reserve the CPU friendly version for commercial 
products. The one exception to this rule is in the use of "repeat 
while the mouse is down" This has a habit of acting up unexpectedly 
and I found it best to avoid it even is casual use.


More information about the Use-livecode mailing list