Touch Event Issue

I’ve encountered an error. No error output. Basically I am trying to make it look like the button was clicked (touched, pushed in, common effect for buttons). This doesn’t seem to be working. (the push in effect is for some reason NOT working. It should, though…)

[lua]function playButton:touch( event )
if event.phase == “began” then
playButton.isVisible = false
playButtonOvr.isVisible = true
elseif event.phase == “ended” or event.phase == “cancelled” then
playButton.isVisible = true
playButtonOvr.isVisible = false
end
end

playButton:addEventListener( “touch”, playButton )[/lua]

Thanks, Noah Atchison, Founder of Zombie Apps. [import]uid: 76200 topic_id: 13768 reply_id: 313768[/import]

Actually, forget I asked anything. I figured this out. :stuck_out_tongue: I stole a UI from Debug Draw to create buttons faster so I’m good. :slight_smile: [import]uid: 76200 topic_id: 13768 reply_id: 50545[/import]

Glad you got it; things are much easier using ui.lua when it comes to neat buttons :slight_smile: [import]uid: 52491 topic_id: 13768 reply_id: 50569[/import]