Page 1 of 1

Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 12:09 pm
by istech
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

Re: Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 4:40 pm
by dunbarx
Hi.

This works fine for me in the IDE. Does it for you as well? Is it only in the mobil standalone that you have problems? Just for compactness, I did:

Code: Select all

on mouseUp
   repeat with y = 1 to 10
      move btn y to the points of grc y in 5 seconds without waiting
   end repeat
   end mouseUp
Craig Newman

Re: Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 4:46 pm
by Klaus
Hi istech,

the syntax looks correct, maybe you should remove the "un-/lock screen" part.


Best

Klaus

Re: Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 5:02 pm
by istech
Thanks for the reply.

The code works fine in IDE just not mobile. I think it is processing power, or lack there of.

I will give the repeat a go and report back..

Re: Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 5:54 pm
by Klaus
istech wrote:The code works fine in IDE just not mobile. I think it is processing power, or lack there of.
That is very possible!

I have a project that I need to completely modify to run on Android at all!
Lots of "move"ing stuff etc. and it just won't run even on decent Android hardware 8)

CHEAP-O! :D

Re: Move Multiple Graphics on Mobile simultaneously

Posted: Tue Apr 01, 2014 11:19 pm
by istech
The repeat makes little difference.

interesting that on a ipad all is good.

Android not so much.

My Android is quite high spec. So not sure what the problem could be other than CPU performance issues.

I will try a couple workarounds and see how it goes.