You need to detect when the button becomes pressed rather than when it is pressed. Look at the StateChangeDetection example in the IDE for an example of how to do it.
You need to detect when the button becomes pressed rather than when it is pressed. Look at the StateChangeDetection example in the IDE for an example of how to do it.