Hi roaminggamer …
I got the camera app.
local sessionComplete = function(event) local image = event.target print( "Camera ", ( image and "returned an image" ) or "session was cancelled" ) print( "event name: " .. event.name ) print( "target: " .. tostring( image ) ) if image then -- center image on screen image.x = centerX image.y = centerY local w = image.width local h = image.height print( "w,h = ".. w .."," .. h ) end end
If I want to add an event listener to the actual photo
how do I do that, I add the “touch” function to the image
but that is NOT the actual image of the picture
I do this and is not working
function image:touch( event ) if event.phase == "began" then image.rotation = 45 -- set touch focus display.getCurrentStage():setFocus( self ) self.isFocus = true elseif self.isFocus then if event.phase == "moved" then elseif event.phase == "ended" or event.phase == "cancelled" then image.rotation = 0 -- reset touch focus display.getCurrentStage():setFocus( nil ) self.isFocus = nil end end return true end image:addEventListener( "touch", image )
Thanks