play pause buttons - mousePressed
in
Programming Questions
•
6 months ago
Hey,
I'm trying to make play/pause buttons... I used this example: http://processing.org/learning/topics/button.html
In my program, one is a play button and the other is a pause button.
I tried to use noLoop() and loop() commands... I'm able to pause the program using noLoop(), but then the play button doesn't work...
The function is based on the mouse position, so when i call the noLoop() command, the position stops being updated, because the draw() function is no longer on loop, and i can't call the loop() command...
Does someone have any idea for this problem?
Thanks
I'm trying to make play/pause buttons... I used this example: http://processing.org/learning/topics/button.html
In my program, one is a play button and the other is a pause button.
I tried to use noLoop() and loop() commands... I'm able to pause the program using noLoop(), but then the play button doesn't work...
The function is based on the mouse position, so when i call the noLoop() command, the position stops being updated, because the draw() function is no longer on loop, and i can't call the loop() command...
Does someone have any idea for this problem?
Thanks
1