moving object simultaneously

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

moving object simultaneously

Post by Jellobus » Sun Mar 09, 2014 5:04 am

Hi guise,

I am trying to move several objects simultaneously. I was using repeat structure...but I found it was a wrong approach. :roll:

1. there are 10 images
2. move images 1 ~ 10 from Loc (A) to Loc (B) in random(10) thicks simultaneously.
3. each object has different speed when it moves

but it seems impossible until each image completes its action with repeat structure. Is it possible to move all object at the same time?

Cheers,


Louis

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: moving object simultaneously

Post by dunbarx » Sun Mar 09, 2014 5:49 am

Hi.

Try this. Make three buttons. Put them along the top of the card. In a fourth button somewhere, put this into its script:

Code: Select all

on mouseUp
set the lockmoves to "true"
   move btn 1 relative 0,50 without waiting
   move btn 2 relative 0,50  without waiting
   move btn 3 relative 0,50  without waiting
set the lockmoves to "false"
end mouseUp
Press button, Voila.

Craig Newman

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: moving object simultaneously

Post by Simon » Sun Mar 09, 2014 5:50 am

Hi Louis,
Check out lockMoves in the dictionary.
Think that is what you want.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: moving object simultaneously

Post by Jellobus » Sun Mar 09, 2014 6:42 am

Hi Simon and Dunbarx,

Thanks a lot for your help. :D
It looks like nothing is Impossible with LC!

Cheers,

Louis

Post Reply