Canvas detect hold sprite (Not drag)

Hello, I need some help

I’m trying to make a canvas game, with sprites to serve as buttons to move the character
I would like to be able to detect when I release the sprite and when I hold them (but without dragging).

In short: if I tap the sprite-button the character does one step, but if I hold the sprite-button it keep going until I let go of the sprite-button.

I tried looking up google, the best I could find was this:

But it doesn’t work because it doesn’t detect the release of the sprite, it just allow me to check if the character is moving a few moments after clicking it, and if it is, to stop it. This does not work for me at all.

I’ve also found a post here named “Canvas and sprites release done?” (I can’t link it, I’m limited to 2 links)

Apparently Thunkable was supposed to have blocks for exactly what I want? But they were never released, looking at this post date.

This is my project so far:
https://x.thunkable.com/projectPage/5fb8f7186d856500111b81d1

So yeah, anyone know a working solution?
thanks in advance.

Hi @marine.bocquetpncnj, I saw your project, I live tested the app on my phone, you can try gyroscopic sensor if you want i have a piece of code,I’ll send it in two minutes


you can try this instead of clicking buttons for changing the x-axis and y-axis, instead of ball you can put that sprite character, I hope this solved your problem

Thanks :grinning:

Hey,
thanks a lot for the answer, but while this does work, it doesn’t do what I want/need

I know there are other ways to do this, with accelerometer, or even with buttons that aren’t on the canvas
But I would really like to know if there is a solution to do this entirely inside the canvas
Aside from doing it for myself, I figure it would be very very useful for a lot of other things
And the detection of touch-up is such a basic thing, I don’t even understand why Thunkable doesn’t already have it?

But thanks anyway, it was nice of you to help :smiley:

Sure, feel free to ask anything to me by mentioning me if you have any question, I’ll be more than happy to answer

Thanks :grinning: :slightly_smiling_face: