So I suppose something like this could be used to complete all ongoing transitions to their final states when transitions are canceled:
[lua]
local function completeTransition(obj)
if obj.trans then
for key,value in pairs(obj.trans._keysFinish) do
obj[key] = value
end
obj.trans = nil
end
end
local function touchEvent(event)
if event.phase==“began” then
transition.cancel()
end
end
local circle = display.newCircle(display.contentCenterX, display.contentCenterY,20)
circle.alpha = 0
local trans = transition.to(circle,{time=10000, x=0, y=0, xScale = 2,yScale = 2, alpha = 1, onCancel = function(obj) completeTransition(obj) end })
circle.trans = trans
local circle2 = display.newCircle(display.contentCenterX, display.contentCenterY,20)
local trans2 = transition.to(circle2,{time=10000, x=display.contentWidth, xScale = 4, yScale = 4, onCancel = function(obj) completeTransition(obj) end})
circle2.trans = trans2
circle:addEventListener(“touch”, touchEvent)
circle2:addEventListener(“touch”, touchEvent)
[/lua]
When you touch either of the circles all transitions are canceled and all transition properties are set to their final values. This approach requires the transition to be stored in the displayobject and could of course be handled a bit differently.