Yah yah, I know, reviving an older thread again
However, while the pointed out without waiting method *does* work, I am curious as to why 'lockMoves' does not appear to work as listed in the dictionary, tested in Lc vers. 6.5 to 9.x dp.
In testing it, I have some 5 "bubbles" that I would like to move along 5 paths (created with the freehand tool). Here is a picture of the final result, the bubbles on the right are what I wanted the final positioning to be, and do not move (they will be removed later), the lines are the drawn paths, and of course the bubbles are in their final position -
According to the dictionary, setting lockMoves to true and then moving the bubbles along the path of the lines, finally setting lockMoves to false
should cause all the moves to wait, then move all at once.
Of course, this does not happen, instead each bubble shows the start and end of its journey instead? The code used is pretty generic, I just want to make sure I am using it correctly:
Code: Select all
on openStack
// set the lockMoves to true <- first attempt, I tried it here, bubbles move to beginning, then jump to end...
// move the bubbles to their starting position...
set the location of graphic "bubOne" to 113,395
set the location of graphic "bubTwo" to 106,391
set the location of graphic "bubThree" to 5,395
set the location of graphic "bubFour" to 137,394
set the location of graphic "bubFive" to 103,390
// this starts the move handler...
moveBubbles
end openStack
on moveBubbles
// set the lockMoves to true <- tried it again here, same result...
move graphic "bubOne" to the points of graphic "mainPathOne" in 3 seconds
move graphic "bubTwo" to the points of graphic "mainPathTwo" in 3 seconds
move graphic "bubThree" to the points of graphic "mainPathThree" in 3 seconds
move graphic "bubFour" to the points of graphic "mainPathFour" in 3 seconds
move graphic "bubFive" to the points of graphic "mainPathFive" in 3 seconds
// set the lockMoves to false
end moveBubbles
Having failed to get lockMoves working properly, I did finally find this thread. The 'withoutWaiting' *does* work, however the "bubbles" move very jerkily, where moving them one at a time moves them close to ideally.
If anyone can explain, I'd love to hear it