Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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");



— asked April 16th 2010 by Andrew Charon
  • iphone

1 Answer

  • How about "touchstart" and "touchend"? although I am not quite sure why you will want to bind 3 events like that…


    — answered April 17th 2010 by Raul Riera
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.