Hi,
I have two buttons on my app and i want to call the function showImage( ) only when both buttons have been pressed al least one time. How could i do that?
[lua]
local button_1 = display.newRoundedRect( common.centerX-200, common.centerY+200, 150, 50, 12 )
local button_2 = display.newRoundedRect( common.centerX+200, common.centerY+200, 150, 50, 12 )
local image = display.newImage ( “illustration.png”, 500, 500 )
image.alpha= 0
local function showImage( )
transition.to(image, {time=1470, alpha=1, transition=easing.inOutExpo } )
end
button_question:addEventListener (“tap”, question)
button_answer:addEventListener (“tap”, answer)[/lua]