# Canvas and Stage Settings

**URL:** <https://community.thunkable.com/t/canvas-and-stage-settings/737673>\
**Category:** Questions about Thunkable X\
**Created:** [August 13, 2020, 5:08am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673 "2020-08-13T05:08:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 13, 2020, 5:08am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/1 "2020-08-13T05:08:10Z")

</div>

Is there away to figure out when the user lifts his/her hand from the canvas. I am trying to build an app where a sprite automatically goes to a user’s finger when they touch the canvas, and follows the users fingers. I need a way for the canvas to detect when the user lifts his or her finger any suggestions on how to do this?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 13, 2020, 8:52am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/2 "2020-08-13T08:52:38Z")

</div>

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec9bbfe04d98a4bd2828f005f9be9d6298aa9a0c.png)

---

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 14, 2020, 7:21pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/3 "2020-08-14T19:21:06Z")

</div>

actech I did try that block but it doesn’t work since I’m not really dragging the sprite. I am having the sprite move to where my finger is on the canvas. I need to be able to have the sprite hide when I stop dragging my finger on the canvas if that makes since.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 15, 2020, 6:32am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/4 "2020-08-15T06:32:27Z")

</div>

In this case, the problem can be solved as follows. When you click on the canvas, a timer is activated to track changes in the finger’s coordinate. If the coordinate does not change during the specified time interval, it means that the finger has been removed from the screen and you can move the sprite and turn off the change tracking timer.

---

<div class="post-metadata">

**Author:** ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://community.thunkable.com/u/seth)\
**Post date:** [August 15, 2020, 11:47pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/5 "2020-08-15T23:47:40Z")

</div>

Can you set an IF condition of: IF the Sprite X & Y = the Pointer X & Y then Hide?

---

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 16, 2020, 5:51am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/6 "2020-08-16T05:51:37Z")

</div>

Seth I have tried that but that doesn’t work also.

---

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 16, 2020, 5:52am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/7 "2020-08-16T05:52:14Z")

</div>

acetech I tried the timer to see if that would work but, still no luck thanks for the idea!

---

<div class="post-metadata">

**Author:** ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://community.thunkable.com/u/seth)\
**Post date:** [August 16, 2020, 11:42am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/8 "2020-08-16T11:42:46Z")

</div>

If you use a loop forever, it will follow the pointer.

You want it to go after the user lifts their finger, right?

Going back to what actech said, you can then compare the X&Y of the last pointer position and if it has been that for x time then you can delete it.

 ![Screenshot 2020-08-16 at 12.50.31](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f511264f7334fa2625da80ae5fa85dd5a918f173.png)

It may be incorrect to put the X to X check there, I’m still testing really. But do you see the direction of my thinking?

 ![Screenshot 2020-08-16 at 13.03.44](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/77ac94d6c461f62e50add7596808705f5187232b.png)

---

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 17, 2020, 12:39am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/9 "2020-08-17T00:39:19Z")

</div>

Seth I don’t understand the does timer milliseconds contain 5, at some point that would be true, Also at some since we want the sprites active x to go to the canvas active point that would also be true so it would constantly be removing the sprite. Unless I’m totally not understanding your code.

---

<div class="post-metadata">

**Author:** ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://community.thunkable.com/u/seth)\
**Post date:** [August 19, 2020, 7:24pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/10 "2020-08-19T19:24:45Z")

</div>

I’m not sure if my code will work for your application, but maybe it can be an inspiration.

Is there any compromise?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 20, 2020, 6:35am UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/11 "2020-08-20T06:35:31Z")

</div>

Check it

[https://x.thunkable.com/projects/5f3e14be47debb8597bfec31/project/properties/designer/](https://x.thunkable.com/projects/5f3e14be47debb8597bfec31/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@harper](https://community.thunkable.com/u/harper)\
**Post date:** [August 20, 2020, 1:32pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/12 "2020-08-20T13:32:06Z")

</div>

Seth,

Thanks for the help I will check out your code. Right now I am using the canvas drag, and have the sprite bounce of the edges of the screen.

I appreciate the help!

---

<div class="post-metadata">

**Author:** ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://community.thunkable.com/u/seth)\
**Post date:** [August 20, 2020, 1:53pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/13 "2020-08-20T13:53:49Z")

</div>

Thanks, I felt I was close but I don’t have a lot of spare time these days.

If you find a way to almost do it please post and I’ll be happy to have a look.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:24pm UTC](https://community.thunkable.com/t/canvas-and-stage-settings/737673/14 "2024-11-08T12:24:41Z")

</div>


