Hi I need a nodge in the right direction.
I have 3 images. And I want some thing to happen if 1,2 or 3 is touched.
local function myTapListener( event )
– Code executed when the button is tapped
if event.target == T1 then
print(“one was touched”)
elseif event.target == T2 then
print(“two”)
end
return true
end
local T1 = display.newImage(image[r1], 0.5, 0.5)
local T2 = display.newImage(image[r2], 0.5, 0.5)
local T3 = display.newImage(image[r3], 0.5, 0.5)
T1:addEventListener( “tap”, myTapListener )
T2:addEventListener( “tap”, myTapListener )
T3:addEventListener( “tap”, myTapListener )
I don’t see the clear path to touch image 1 -> do what is said and print the text