thanks but for a tap zoom in/out effect, i guess following transition.to work easier
local bluePrint = display.newImageRect('editor/blueprint01.png', display.contentWidth, display.contentHeight)
bluePrint:setReferencePoint( display.CenterReferencePoint )
bluePrint.x, bluePrint.y = g.splash.x, g.splash.y
localGroup:insert(bluePrint)
local zoom = ''
local prevRefX, preRefY = 0, 0
local updateRuntimeEvent = function(e)
if e.phase == 'ended' then
local listener1 = function( obj )
print( "Transition 1 completed on object: " .. tostring( obj ) )
end
-- default zoom in
if zoom == '' or zoom == 'out' then
localGroup.xReference = e.x
localGroup.yReference = e.y
transition.to( localGroup, { time=500, xScale = 2, yScale = 2, onComplete=listener1 } )
zoom = 'in'
else
transition.to( localGroup, { time=500, xScale = 1, yScale = 1, onComplete=listener1 } )
zoom = 'out'
end
end
end
Runtime:addEventListener('touch', updateRuntimeEvent)
it’s working better now [import]uid: 10373 topic_id: 16568 reply_id: 62108[/import]