How to control sequence of showing images and moving them?

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
paulgabel
Posts: 31
Joined: Tue Jun 19, 2007 7:03 pm
Location: Scotts Valley, California, USA
Contact:

How to control sequence of showing images and moving them?

Post by paulgabel » Sun Jul 13, 2008 5:00 am

Code: Select all

on mouseUp
   start using stack "animationengine"
   aeSetFrameRate 50
   -- stop all moving done by aeMoveTo
   aeStopMoving "all"
   -- make sure moves are unlocked
   aeUnlockMoves
   -----
   set the loc of image "E Big" to 885,535
   show image "E Big"
   wait 20 ticks
   aeMoveTo the long id of image "E Big",150,150,1000,"overshoot"
   -----
   wait 20 ticks
   set the loc of image "X Small" to 885,535
   show image "X Small"
   wait 20 ticks
   aeMoveTo the long id of image "X Small",277,181,1000,"overshoot"
   -----
   wait 20 ticks
   set the loc of image "A Small 1" to 885,535
   show image "A Small 1"
   wait 20 ticks
   aeMoveTo the long id of image "A Small 1",418,180,1000,"overshoot"
   -----
   wait 20 ticks
   set the loc of image "M Small" to 885,535
   show image "M Small"
   wait 20 ticks
   aeMoveTo the long id of image "M Small",583,183,1000,"overshoot"
end mouseUp
I just started on ae today (registered user). In the above script, each of the letters E-x-a-m is supposed to pop up in the lower right corner of the window and then move to its assigned location, but what happens is that all the letters appear on top of each other, then start moving. How can I achieve appear —> move, appear —> move, etc.?

Thanks,

Paul Gabel
Paul Gabel

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Sun Jul 13, 2008 8:34 am

aeMoveTo is nonblocking, so it'll execute whenever there's enough time to do so. To wait for one to finish you need to handle the aeMoveDone message in the relevant objects (or further up the message path).
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

paulgabel
Posts: 31
Joined: Tue Jun 19, 2007 7:03 pm
Location: Scotts Valley, California, USA
Contact:

Thanks

Post by paulgabel » Mon Jul 14, 2008 6:10 am

Thanks Bjornke. With your tip, I figured it out. Still a long way to go though.
Paul Gabel

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Mon Jul 14, 2008 2:45 pm

Hi Paul,

glad you figured it out. Thanks for the help Björnke.
I will come up with a decent set of tutorials later this quarter, however, it would be a great help if users requested some topics. That would help me preparing stuff that is of interest.

All the best,

Malte

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: How to control sequence of showing images and moving them?

Post by malte » Mon May 17, 2010 10:19 am

What exactly are ou after jedc53?

All the best,

malte

Post Reply

Return to “Animation Engine”