I did it wrong, but now it's working perfect......
Glad you've got it working.
I prefer the second option, stopping the loop on releasing the button.
But your solution is also verey usefull.
I'm a bit confused though -
Both methods should stop the loop when the button is released, are you
saying one of the methods didn't?
My solution was the second of the two examples I posted, if you mean the API
method.
Regards,
Peter T