Move another object after the first one is done transitioning or is collided

I am using transition.to to move objects, but the problem is that I don't know how to get another object to start transitioning after the first object either finishes moving or is collided with. Can anyone help me?

can you explain more your problem...what do you want to do when you move the first object?

If it's collision you'd use a collision listener, if it's on complete then it would be like this;

1
2
3
4
5
local function trans1 ()
transition.to(obj2, {time=1000, x=100})
end
 
transition.to(obj1, {time=1000, y=100, onComplete=trans1})
views:1834 update:2012/2/8 8:46:10
corona forums © 2003-2011