Advice please: lockmoves not working as expected

Klaus Major klaus at major-k.de
Tue Oct 28 13:49:29 EDT 2008


Hi Ian,

> Hi
>
> I have a stack, the purpose of which is to simulate a circle turning
> one revolution horizontally.
>
> To achieve this I have a button designated as a marker which moves
> along the path of a cycloid.
> At the same time I have a graphic of a circle moves along a  
> horizontal line.
> Both objects when moving should simulate the turning affect.
>
> Having set up the curve and line as graphics, each with 64 points, I
> put the following code into a button
> --------------------------
> on mouseUp
>
>   set the lockmoves to true
>
>   move  button "marker" to the points of graphic "myCycloid"  in
> 2500 milliseconds
>   move graphic "myCircle" to the points of graphic "myLine" in 2500
> milliseconds
>
>   set the lockmoves to false
>
> end mouseUp

the magic phrase is "without waiting" :-)

on mouseUp
   set the lockmoves to true
   move  button "marker" to the points of graphic "myCycloid"  in 2500  
milliseconds without waiting
   move graphic "myCircle" to the points of graphic "myLine" in 2500  
milliseconds without waiting
   set the lockmoves to false
end mouseUp


Best

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list