Hello,
I want to make a spot the differences game so I’ll put 2 photos that have 5 differences and on every differences there will be a crosshair or a circle but hidden so when the player taps on the difference the crosshair will appear so I used that code
local image = display.newImage( “crosshair.png”, 30, 50 );
image.alpha = 0
local onTouch = function (event)
if event.phase == “began” then
image.alpha = 1
return true
end
end
Runtime:addEventListener( “touch”, onTouch )
but the problem is the crosshair appears if I touched anywhere on the screen I want to make it appear when I touch its place either than this nothing will appear so please help me. and do u think that it’s the right way to hide the crosshairs and show it after touching it or what?