How to turn on a led for the time that a button is pressed down?


    Mar 06 2012 | 8:29 am
    Hello,
    I have a question about buttons. Is it possible to create a button that sends '1' for the time that you click on it with your mouse, and sends '0' when you release your mouse button? I want to turn on a led for the whole time that a button is pressed down.
    Now I've done this with a toggle, but it doesn't give exactly the right effect. Since you need to click twice to turn it on and off.
    Thanks a lot!

    • Mar 06 2012 | 9:30 am
      There's probably (got to be!) something simpler, and the toggle engages with mouse clicking elsewhere on the window, but it does work..
    • Mar 06 2012 | 9:51 am
    • Mar 06 2012 | 9:53 am
      I had the same problem and made my own using the ubutton and an Int.
    • Mar 06 2012 | 10:00 am
      @soma:
      in M4L you can set bang transition of Button to both sides, 0 to 1 and 1 to 0
    • Mar 06 2012 | 1:25 pm
      But the Live.button is always round, no?
    • Mar 06 2012 | 1:50 pm
      yes, but you can overlay a panel if roundness is a issue.
    • Mar 06 2012 | 11:11 pm
      an other one using the "idle mouse" outlet of textbutton
      `