Page 1 of 1
simultaneous movement
Posted: Tue Aug 18, 2009 11:54 pm
by synaptic
Can someone help me with some simple code to make two graphics move simultaneously? Currently, I've got them both turning to random angles, but they won't do it at the same time... any suggestions? I'm pretty new to Rev and to programming in general, and it feels like I"m missing something obvious...
Thanks!
Posted: Wed Aug 19, 2009 12:15 am
by bn
Hi Synaptic,
when you issue your move command add "without waiting", that will move both graphics at the same time.
If you have more graphics you want to move at the same time you can issue a set the lockmoves to true / set the unlock moves to true before and after the the commands for moving the graphics, still without waiting.
example: make a new stack and two oval graphics, call them "myOval" and "myOval1". One butto with the following script
Code: Select all
on mouseUp
set the lockmoves to true
move graphic "myOval" to random(400),random(400) in random(3) seconds without waiting
move graphic "myOval1" to random(400),random(400) in random(3) seconds without waiting
set the lockmoves to false
end mouseUp
regards
Bernd
Posted: Wed Aug 19, 2009 12:38 am
by synaptic
Thanks!