Lock Moves

Ender Nafi Elekcioglu endernafi at gmail.com
Tue Oct 29 11:57:19 EDT 2013


Hi Ray,


You’re right; adding *without waiting* solves the problem.
I realized that locking the moves has no effect if *without waiting* is used.
Strange, isn’t it?

Anyway, it didn’t work on my actual project which has 2 objects which need to be moved in sync.
Then I put *without waiting* just after the first one; and voila :)

__move object 1 to tLoc1 without waiting
__move object 2 to tLoc2

Thanks for the help…


~ Ender Nafi


On October 29, 2013 at 17:48:46, Ray (ray at linkit.com) wrote:

Ender,

This is working fine for me:

on mouseUp
set the loc of img "Ant" to 128,57
set the loc of img "Bee" to 342,71
set the lockMoves to true
move img "Ant" to 22,338 in 1 second without waiting
move img "Bee" to 398,346 in 1 second without waiting
set the lockMoves to false
end mouseUp

What happens if you do this? Is your script different since it's using  
different types of objects?

Ray


On 10/29/2013 11:16 AM, Ender Nafi Elekcioglu wrote:
> Does anyone know the formula to move different objects at the same time?
>
> The code from dictionary doesn’t seem to work:
> _on mouseUp
> __set the lockMoves to true
> __move button 1 to 300,200 in 2 seconds -- doesn't move yet
> __move field 2 to 0,0 in 2 seconds -- doesn't move yet
> __move graphic 3 to 0,400 in 2 seconds -- doesn't move yet
> __set the lockMoves to false -- all three objects start moving
> _end mouseUp
>
> It waits 2 seconds then set the lock first object {not move, set the loc},
> then wait another 2 seconds then set the loc of second object and so on...
>
> I remember that I once achieved to move synchronously with a different blend of *without waiting* and *without messages* parameters but this time I couldn’t.
>
>
> Best,
>
> ~ Ender Nafi
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the Use-livecode mailing list