I put a .png transparent. the size of the window.
it works really good, If I touch and move the mouse.
could you tell me about the percentage %
how do I do that.
I have this code so far
local swipe = display.newImage( "swipe.png" ) group:insert (swipe) swipe.x = display.contentWidth / 2 + 256 swipe.y = display.contentHeight / 2 swipe.id = "swipe" function swipe:touch( event ) if event.phase == "began" then print( "Touch event began on: " .. self.id ) -- set touch focus display.getCurrentStage():setFocus( self ) self.isFocus = true elseif self.isFocus then if event.phase == "moved" then print( "Moved phase of touch event detected." ) elseif event.phase == "ended" or event.phase == "cancelled" then storyboard.gotoScene( "page2", "fromRight", 100 ) -- reset touch focus display.getCurrentStage():setFocus( nil ) self.isFocus = nil end end return true end swipe:addEventListener( "touch", swipe )
Thanks