How to create a scratchcard

can someone tell how to create scratchcard there is an image first and when they scratch it another image will come

I am not a pro but if I was there I would do this

Use gesture extension
use image in arrangement like horizontal arrangement
The initiate variable
Count number of swipes using Variable (Gesture component will help here)

And once variable reaches particular number
Change the image

i dont want it like that i want a perfect scratch card

Use canvas somehow.

Search YouTube my Friend.

thank you for the video @ADDYLIN
i just checked the video again this not what i was looking for

How to create a Scratchcard
Taifun

1 Like

taifun i saw your scratchcard tutorial i need that there will first be a image but when they scratch it anotther image will starting to show

afaik this will not be possible using a canvas then…
probably a webviewer solution might be possible…
you might want to invent something yourself…
be creative!

Taifun

I believe you can do it using Taifun’s method, but it would take some preparation to create the “top” image. Something like:

  1. Add your top image to the canvas background
  2. Get the pixel colour of each pixel in the canvas, add this and its x,y coordinates to a list.
  3. Clear the canvas
  4. Add your “bottom” image to the canvas background
  5. You should now be able to “draw” the “top” image on the canvas using the data in the list. (This is the init procedure in Taifun’s method)
2 Likes

this solution might be able to do it


Taifun
1 Like