moveStopped?

Dave Cragg dcragg at lacscentre.co.uk
Mon Jan 26 12:21:46 EST 2004


At 10:59 am -0600 26/1/04, Peter T. Evensen wrote:
>There must be something simple I'm overlooking.  I have the
>following in an object's script:
>
>on mouseUp
>                 move me to 300, 400 in 10 sec
>end mouseUp
>
>on moveStopped
>         beep
>         set the loc of me to 10, 10
>end moveStopped
>
>moveStopped is never sent to the object.  I've tried this with a
>group and with a circle graphic.   No beep.  I even put a breakpoint
>in the on moveStopped, it never breaks.

Try this:

on mouseUp
     move me to 300, 400 in 10 sec without waiting
end mouseUp

on moveStopped
    beep
    set the loc of me to 10, 10
end moveStopped

or this:

on mouseUp
   move me to 300, 400 in 10 sec
    beep
    set the loc of me to 10, 10
end mouseUp

The moveStopped message is only sent when "without waiting" is used. 
The dictionary entry under moveStopped doesn't make this clear, but 
it's decribed under the "move" entry.

Which to use depends largely on whether you want the script to 
continue while the move is taking place.

Cheers
Dave



More information about the use-livecode mailing list