how to fix delay in transition

I have a trouble in this game. I use transition to move object in game. but transtion have a time to complete the moving.So when i touch to screen to change the direction of object during the object moving, the direction not changed. anyone can help me?

[import]uid: 116872 topic_id: 20372 reply_id: 320372[/import]

You would first have to cancel the transition then make the transition happen again.

For example:

[lua] local trans1 = transition.to(currentTarget, { time=400, y=50})

local function click()
transition.cancel(trans1)
local trans1 = transition.to(currentTarget, { time=400, y=25})
end

button:addEventListener(“touch”, click)[/lua]

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 20372 reply_id: 79604[/import]

Thanks a lot…:x:x I have fixed a trouble…That is easier than I think :x [import]uid: 116872 topic_id: 20372 reply_id: 79675[/import]