Move Multiple Graphics on Mobile simultaneously
Posted: Tue Apr 01, 2014 12:09 pm
Hi Livecoders,
Q.1 Just looking for a litle guidance or suggestions. I want to move multiple objects simultaneously on a mobile device but what I get is the first graphic moving and the rest trying to move.
I have attached the code is below, is there any opimisation I can do? Maybe send each move to a separate handler?
Q.2 I have also noticed that if I decide to change cards while a move is in process(even with cancel pending messages in close card) the next command after the move will always execute even though I have changed card. ( I have a "if" in place at the moment as a workaround but what is the proper way to stop a "move" on close card and prevent any other commands from running.)
Thanks All
lock screen
set the lockMoves to true
move img "N9" to the points of grc "N1" in 5 seconds without waiting # works fine
move img "N8" to the points of grc "N2" in 5 seconds without waiting
move img "N7" to the points of grc "N3" in 5 seconds without waiting
move img "N6" to the points of grc "N4" in 5 seconds without waiting
move img "N5" to the points of grc "N5" in 5 seconds without waiting
move img "N4" to the points of grc "N6" in 5 seconds without waiting
move img "N3" to the points of grc "N7" in 5 seconds without waiting
move img "N2" to the points of grc "N8" in 5 seconds without waiting
move img "N1" to the points of grc "N9" in 5 seconds without waiting
set the lockMoves to false
unlock screen
Q.1 Just looking for a litle guidance or suggestions. I want to move multiple objects simultaneously on a mobile device but what I get is the first graphic moving and the rest trying to move.
I have attached the code is below, is there any opimisation I can do? Maybe send each move to a separate handler?
Q.2 I have also noticed that if I decide to change cards while a move is in process(even with cancel pending messages in close card) the next command after the move will always execute even though I have changed card. ( I have a "if" in place at the moment as a workaround but what is the proper way to stop a "move" on close card and prevent any other commands from running.)
Thanks All
lock screen
set the lockMoves to true
move img "N9" to the points of grc "N1" in 5 seconds without waiting # works fine
move img "N8" to the points of grc "N2" in 5 seconds without waiting
move img "N7" to the points of grc "N3" in 5 seconds without waiting
move img "N6" to the points of grc "N4" in 5 seconds without waiting
move img "N5" to the points of grc "N5" in 5 seconds without waiting
move img "N4" to the points of grc "N6" in 5 seconds without waiting
move img "N3" to the points of grc "N7" in 5 seconds without waiting
move img "N2" to the points of grc "N8" in 5 seconds without waiting
move img "N1" to the points of grc "N9" in 5 seconds without waiting
set the lockMoves to false
unlock screen