I have a draggable object that, when it reaches the top of the screen, triggers the bg to scroll down one field, taking the object with it. However, once the transition is over, the object suddenly “snap’s” to wherever the user’s finger may be (assuming the user hasn’t yet lifted his finger off the screen). I don’t want this to happen, I want the user to have to retouch the object to get it moving again.
I tried taking control away from the user during the transition by temporarily removing the event listener for the object, but once the event listener is reinstated, the object is a-snappin’ again.
if player.y < 50 thenplayer.y = 50 if flag2~="on" then--I add the listener back after 1.0 sec (the duration of the transition) timer.performWithDelay(1000,function(event) player:addEventListener("touch",onTouch) end, 1)-- I remove the listener for now player:removeEventListener( "touch", onTouch )-- I add the transition transition.to(player, {time = 1000, delay = 0, y = player.y + 920}) transition.to(background, {time = 1000, delay = 0, y = background.y + 1024}) transition.to(background2, {time = 1000, delay = 0, y = background2.y + 1024}) flag2="on" end end[/code]Thank you,Steven [import]uid: 79394 topic_id: 13931 reply_id: 313931[/import]
[import]uid: 52491 topic_id: 13931 reply_id: 51276[/import]