# \[Solved\] Get pointer position repeatedly while dragging (DD)

**URL:** <https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820>\
**Category:** Canvas / Gaming\
**Tags:** beginner\
**Created:** [November 18, 2023, 6:32am UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820 "2023-11-18T06:32:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![leecitra](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leecitra](https://community.thunkable.com/u/leecitra)\
**Post date:** [November 18, 2023, 6:32am UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/1 "2023-11-18T06:32:46Z")

</div>

Hello, iam new in thunkable and trying to migrate to drag and drop feature.

Iam used to app inventor where we can get the pointer position while dragging on top of the canvas. I could not find an option while dragging event as the replacement in thunkable. Iam trying to make Pong games where the paddle following my finger for as long as my finger still touching the phone.

Here is what’ve tried.

1. Turn on draggable feature but the problem the paddle move everywhere, i want to stay at the bottom screen
2. Use when canvas pointer down or paddle sprite is clicked, it does not support drag feature so i have to keep clicking the screen
3. Combine the no.2 and repeat or forever + move paddle sprite to following active pointer x.

no 3 is working as what i expected but i need a block to stop the movement when i stop touching the phone.

 ![Screenshot 2023-11-18 at 13.32.29](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0fb8e5d35a632f47c4c8632b0f42553e10953b77.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 18, 2023, 8:51am UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/2 "2023-11-18T08:51:42Z")

</div>

Thunkable does not have “mouse up” detection which is what you need. I requested this feature two years ago: [Canvas sprite should have mouse up detection · Issue #951 · thunkable/thunkable-issues · GitHub](https://github.com/thunkable/thunkable-issues/issues/951).

---

<div class="post-metadata">

**Author:** ![leecitra](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leecitra](https://community.thunkable.com/u/leecitra)\
**Post date:** [November 24, 2023, 3:09am UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/3 "2023-11-24T03:09:50Z")

</div>

Yes, just like “mouse up” function in Scratch. So we have to create our own procedure to detect when the mouse up then. Thank you for the reply.

Here is my own procedure though it is not flexible. Please give suggestion if you have a better way. Currently it restart the timer when there is a change in X. Otherwise, the TimerInterval will start time and change the “click” to false.

 ![Screenshot from 2023-11-24 10-37-14](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/c/ac2a0b9686cdd69f82801caed4fc537aaf2b262e.png)  
PS: please ignore set label1 as i forgot to remove it

---

<div class="post-metadata">

**Author:** ![tthompson41231](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tthompson41231/32/161401_2.png) [@tthompson41231](https://community.thunkable.com/u/tthompson41231)\
**Post date:** [November 25, 2023, 10:31pm UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/4 "2023-11-25T22:31:52Z")

</div>

Something like this?

Test Project:  
[https://x.thunkable.com/copy/d0f5ede70a2516e6e95604486fd9754b](https://x.thunkable.com/copy/d0f5ede70a2516e6e95604486fd9754b)

 ![ExampleCanvas_2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/505862fe627d869d3f894939f0e5aa9177284155.png)  
 ![ExampleCanvas](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f690bc465e50648fece7c1050e8b5bcd7e8b8c56.png)

---

<div class="post-metadata">

**Author:** ![leecitra](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leecitra](https://community.thunkable.com/u/leecitra)\
**Post date:** [November 30, 2023, 6:42am UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/6 "2023-11-30T06:42:11Z")

</div>

Brilliant, it worked! Thank you. The “is dropped” required Draggable to be on, it is quite confusing. But thank you so much

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [November 30, 2023, 4:03pm UTC](https://community.thunkable.com/t/solved-get-pointer-position-repeatedly-while-dragging-dd/2707820/7 "2023-11-30T16:03:13Z")

</div>


