Hi,
Noob question here – I’m trying to create a full screen push/pop effect like that of an iOS navigation controller. The code below works but there’s a large gap of black space between the exiting group and the incoming group. How do I make it so that the two groups transition side-by-side to create a more legitimate-looking push/pop effect?
[code]
–Assume fromGroup & toGroup each consist of a full screen background image (320x480) and a few buttons
function push( fromGroup, toGroup )
transition.from(toGroup, {time=400, x = display.contentWidth * 2})
transition.to(fromGroup, {time=400, x = -display.contentWidth * 2, onComplete = removeGroup} )
end
function pop( fromGroup, toGroup )
transition.from(toGroup, {time=400, x = -display.contentWidth * 2})
transition.to(fromGroup, {time=400, x = display.contentWidth * 2, onComplete = removeGroup} )
end
local removeGroup = function( obj )
obj:removeSelf()
end
[/code] [import]uid: 54276 topic_id: 9146 reply_id: 309146[/import]