Does anyone know how can I enable page switch via touch (swipe from left to right or vice-versa)? I am trying (without success) do the following:
module(..., package.seeall)
function new()
local menuGroup = display.newGroup()
local drawScreen = function()
local Shape1
Shape1 = display.newImageRect( "Shape1.png", 83, 85 );
Shape1.x = 137; Shape1.y = 112; Shape1.alpha = 0.10
menuGroup:insert(Shape1)
end
drawScreen()
local function Shape1:touch(event)
print(event.name.."occurred")
return true
end
Shape1:addEventListener("touch", Shape1)
return menuGroup
end
I’ve tried to add the “touch” function inside and outside the new() function. Also, I tried to change Shape1 by menuGroup. In all cases, NO SUCCESS
Any help is appreciated.
Thanks, Alex [import]uid: 4883 topic_id: 8427 reply_id: 308427[/import]