Button Event Question
I'm building a game where I want to have a "Button Press", "Button Release" and "Button Out" event attached to a button. The only button event I can get to work is the 'click' event. What is the best way of adding these events to the button?
Here is the code that works. How can I set this for the Button Press and Button Release,etc:
leftButton.addEventListener('click', function()
{
Titanium.API.debug("BUTTON CLICKED");
});
Thanks,
Andrew
1 Answer
-
How about "touchstart" and "touchend"? although I am not quite sure why you will want to bind 3 events like that…
https://developer.appcelerator.com/apidoc/mobile/1.2/Titanium.UI.Button