Advice please: lockmoves not working as expected
Ian McKnight
iangmcknight at googlemail.com
Tue Oct 28 13:47:21 EDT 2008
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
----------------------------------
Without the lockmoves command the objects move along the curves/lines
as they should, albeit one after the other.
However, what I observe is a pause of 2.5 secs, button "marker" jumps
to the end of the curve; another pause of 2.5 secs and the circle does
the same.
This seems to be at odds with what the docs say:-
"To move multiple objects at the same time, set the lockMoves property
to true before issuing the move commands.
When you set the lockMoves back to false, all the pending moves begin at once."
Which implies to me that the commands should be 'queued' and executed
together once lockmoves is false but I'm not seeing that.
I must be missing something! Any advice would be greatly appreciated.
Thanks.
BTW I'm using Rev Enterprise 3.0 with GLX2 Script editor
--
Regards
Ian McKnight
iangmcknight at googlemail.com
=======================
More information about the use-livecode
mailing list