# \[SOLVED\] Scratch card game

**URL:** <https://community.thunkable.com/t/solved-scratch-card-game/2930634>\
**Category:** Canvas / Gaming\
**Created:** [April 5, 2024, 11:30am UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634 "2024-04-05T11:30:56Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![beatbaba7leb](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@beatbaba7leb](https://community.thunkable.com/u/beatbaba7leb)\
**Post date:** [April 5, 2024, 11:30am UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/1 "2024-04-05T11:30:56Z")

</div>

[![](https://img.youtube.com/vi/KmeXNISySn8/maxresdefault.jpg "How To Create Scratch Card App in MIT App Inventor | Scratch Card Game Trick") ](https://www.youtube.com/watch?v=KmeXNISySn8)

Trying to build this simple game… The problem is I cannot treat drawing color to transparent can someone try to replicate or suggest me alternate solution. That is to erase the color

---

<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:** [April 5, 2024, 3:16pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/2 "2024-04-05T15:16:32Z")

</div>

Hi @beatbaba7leb, thanks for reaching out.

There is a current known issue with our canvas where setting the background to transparent is not functioning properly. The issue has been acknowledged by our engineering team but unfortunately, we do not yet have a timeline for fixing the issue.

> [@Issues with sprite causing transparent canvas to be opaque white. \[July 2022\]](https://community.thunkable.com/t/issues-with-sprite-causing-transparent-canvas-to-be-opaque-white-july-2022/1984493/5):
>
> @deanmachine I’ll make a note to keep you updated on this, it may get moved up as a higher priority bug now that we are seeing an increase in users experiencing the problem. You can also keep an eye out on our [Release Notes](https://docs.thunkable.com/release-notes) to see what changes and fixes are being deployed. Feel free to reach out if you need anything else!

---

<div class="post-metadata">

**Author:** ![beatbaba7leb](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@beatbaba7leb](https://community.thunkable.com/u/beatbaba7leb)\
**Post date:** [April 5, 2024, 3:24pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/3 "2024-04-05T15:24:40Z")

</div>

Hi Matt

This is different issue. I’m asking about draw color being transparent. There is nowhere canvas is becoming transparent …stage is becoming transparent

---

<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:** [April 5, 2024, 3:28pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/4 "2024-04-05T15:28:16Z")

</div>

Unfortunately, there is no transparent drawing color available.

---

<div class="post-metadata">

**Author:** ![beatbaba7leb](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@beatbaba7leb](https://community.thunkable.com/u/beatbaba7leb)\
**Post date:** [April 5, 2024, 3:44pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/5 "2024-04-05T15:44:21Z")

</div>

Matt

Sorry I’m first I’m using the canvas how do I capture x and y position of the Sprite user touches.

Also how do I make a text label appear at that position or move that label with the text.

---

<div class="post-metadata">

**Author:** ![beatbaba7leb](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@beatbaba7leb](https://community.thunkable.com/u/beatbaba7leb)\
**Post date:** [April 5, 2024, 5:44pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/6 "2024-04-05T17:44:11Z")

</div>

Just adding …

The spirit I’m talking about are created using create block.

But just reading from other post I do have a drawing on.

Yesterday when I tried to get… when spirit touch component XY blocks it even stopped creating spirits.

I’m not in front of PC right now so can’t share.

---

<div class="post-metadata">

**Author:** ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)\
**Post date:** [April 16, 2024, 5:44am UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/7 "2024-04-16T05:44:31Z")

</div>

I’d like the ability to erase my on canvas as well.

---

<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:** [April 16, 2024, 1:21pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/8 "2024-04-16T13:21:28Z")

</div>

@beatbaba7leb Do you still need assistance with this? Could you share your blocks if you do so we can help assist?

---

<div class="post-metadata">

**Author:** ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)\
**Post date:** [April 16, 2024, 5:09pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/10 "2024-04-16T17:09:29Z")

</div>

@matt_conroy I do still need assistance with this, I’m having the same problem as he is, although I have no blocks to share as nothing I try allows me to know where the pointer is, nor can I erase anything with any of the blocks.

I’ve tried a lot of different variations and nothing changes. Do you have some blocks that would get us started?

---

<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:** [April 16, 2024, 6:28pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/11 "2024-04-16T18:28:14Z")

</div>

> [@beatbaba7leb](#):
>
> how do I capture x and y position of the Sprite user touches

Each time a click event occurs, you could capture the X and Y position of the sprite through the use of the `get X` or `get Y` blocks.  
 ![Screenshot 2024-04-16 at 2.26.40 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d6310d42987be10ac10e477f252a8418746c595.png)

> [@beatbaba7leb](#):
>
> how do I make a text label appear at that position or move that label with the text.

You can also set the label’s X and Y coordinates based on this as well.  
 ![Screenshot 2024-04-16 at 2.27.45 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/8/9864e4bdec9b742200c3747fa73a4df11ddf6077.png)

---

<div class="post-metadata">

**Author:** ![tiny\_apps](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tiny\_apps](https://community.thunkable.com/u/tiny_apps)\
**Post date:** [April 16, 2024, 6:57pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/12 "2024-04-16T18:57:53Z")

</div>

Hi Matt

Are the components get X and get Y blocks working I have been told that there is an issue with this blocks

---

<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:** [April 16, 2024, 7:15pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/13 "2024-04-16T19:15:03Z")

</div>

They should be! There is another issue with the canvas blocks:

> [@Canvas drawing color bug](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944/1):
>
> Hi Thunkable folks, I have a simple drawing app that has a funny bug in it. The same app worked about a year ago, so it seems like it is potentially due to a Thunkable change. You can find the app here: [Thunkable](https://x.thunkable.com/copy/3064d08adea7cd940fb55a454e5c7470) This app runs fine for me on my device, but it crashes immediately in the Web Preview. I have determined the the culprit is setting a Canvas Stage’s “drawing color” when the screen is opening. This crashes the web preview: [2024-04-10 12\_20\_13-Window] The problem is that I want to …

But this is because of canvas blocks being set when a particular screen loads. They should always be set with the “When canvas loads” block to have behavior that occurs when the canvas component is available. The canvas isn’t loaded when the screen starts which can cause issues or errors.  
 ![image - 2024-03-27T142853.386](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0e1345ac4199196826de4c4e35aac6c6d234aff1.png)

In the longer term, our engineering team will work to get a fix here so that you can use the `when canvas loads` block again.

---

<div class="post-metadata">

**Author:** ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)\
**Post date:** [April 16, 2024, 9:35pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/14 "2024-04-16T21:35:54Z")

</div>

@matt_conroy So then there is not a way to get the location of the pointer?

---

<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:** [April 18, 2024, 9:37am UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/15 "2024-04-18T09:37:27Z")

</div>

Hello @overshield  
Unfortunately, it seems that Label Canvas blocks don’t have any effect on mobile but they work on Web Preview.  
 ![image (1)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/d/0dbba0fe9a5d19f6f2759c1b63681dbf7627a27d.png)

We’re committed to finding a resolution quickly, and we will keep you updated as soon as there is any progress.

---

<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:** [May 6, 2024, 5:34pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/16 "2024-05-06T17:34:00Z")

</div>

Hello @beatbaba7leb @overshield @tiny_apps  
thank you again for your patience. I would like to let you know that we have officially released a fix for the issue with the canvas blocks.

Please keep in mind that you may need to do a [hard refresh](https://docs.thunkable.com/getting-started/data-sources/data-sources#hard-refresh-your-browser) of your browser for the changes to take effect in your project. If this issue is present on the [Thunkable Live](https://thunkable.com/mobile) app, you will want to update that through the App Store and/or Google Play Store before any changes will occur. If your [downloaded or published app](https://docs.thunkable.com/publishing-apps/publish) is affected by this bug, you will need to re-download or re-publish your app for these changes to take effect.

---

<div class="post-metadata">

**Author:** ![tiny\_apps](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tiny\_apps](https://community.thunkable.com/u/tiny_apps)\
**Post date:** [May 6, 2024, 11:51pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/17 "2024-05-06T23:51:49Z")

</div>

What is fixed

X and y position  
Transparent drawing color

Or both?

Please let us know if anything else is fixed

---

<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:** [May 7, 2024, 9:55am UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/18 "2024-05-07T09:55:38Z")

</div>

Hello @tiny_apps 👋  
The x and y position issue was fixed!  
The transparent drawing color is something that we don’t currently support but you could create a #Feature Requests about it.  
Let me know if you have more questions.

---

<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:** [May 8, 2024, 6:36pm UTC](https://community.thunkable.com/t/solved-scratch-card-game/2930634/19 "2024-05-08T18:36:44Z")

</div>


