Questions tagged [scratchcard]
20 questions
4
votes
3 answers
How to implement a scratch card / view in react-native?
I'm looking for a package to implement a scratch card in react-native. I have found this library https://github.com/thebylito/react-native-scratch-card but the problem is that it works only on android. Is there a library that works on both iOS and…

Ahmad S. Sadek
- 106
- 4
- 9
3
votes
0 answers
How can I create a scratchcard with real numbers and track if some specific numbers are scratched or visible?
I have a game scratchcard and using Scratchcard HTM5 Plugin.
Here is the image:
The scratched area is the gold part and under it there are points numbers.
Here is the image for that:
With the plugin am adding the following code:
var theFiles =…

Ana DEV
- 1,018
- 2
- 17
- 39
2
votes
1 answer
Creating scratch card but container won't show at the end
I have a scratch card i'm creating using the jQuery and websanova/wScratchPad.
The scratch pad is working well, but it's supposed to pop up a new container and a button once 50% of the surface is revealed. It is not.
Here is the link to the glitch…

Mike Haskin
- 23
- 3
2
votes
0 answers
How can I draw scratch coupons in xamarin forms?
I want to create scratch coupons for my xamarin.forms app. I want that when user install the app first time, a scratch coupon will visible on top of the app like popup. And then user will scratch it and know what is he getting.
How can we create…

anand
- 1,399
- 5
- 23
- 55
1
vote
0 answers
Error when using react-scratchcard-v2 on mobile: Unable to preventDefault inside passive event listener invocation
I am using react-scratchcard-v2 to create a scratchcard game. It works fine on desktop, but when using it with touch (either on mobile or in the mobile view of Dev Tools), it still works, but I get his error:
react-dom.development.js:6878 Unable to…

Michael Kolesidis
- 250
- 1
- 4
- 14
1
vote
1 answer
Scratch card effect for ios
I am trying to make a scratch card type of application for iOS.
I am able to wipe the image using a finger initially.
But I want to come to prompt an alert as soon as the image is completely wiped out.
I used the following code to wipe:
-…

Lokesh Sundriyal
- 11
- 1
0
votes
0 answers
Scratch card game with non-repeat array
This is a scratch card game I modify using script from https://jennamolby.com/interactive-scratch-and-win-landing-page-tutorial/ . I was trying to make a scratch card game that plan to use on a e-commerce website promotion. So far I can get the…

Yi foong Chan
- 29
- 5
0
votes
1 answer
How to reload canvas image in Reactjs
im trying to implement a scratch card in Reactjs, when the component mount I'm able to load an image on the canvas to scratch it, the issue is when I click to reload the scratch card to play again I'm not able to reload an image, only a background…

bissan ghaybeh
- 1
- 1
0
votes
0 answers
Is it possible to provide a google pay scratch card for using your app?
Suppose I created an App, and every time the user completes an action on my app, they get a scratch card (but in google pay). Is such a support provided by google pay?

thedarkgriffen
- 394
- 3
- 16
0
votes
3 answers
Generate a 9 digit number with no more than 3 duplicate numbers
I'm trying to create a scratch card like system in php that displays a winner or loser based on random generate numbers.
I know i can create a random number using mt_rand or rand ranging from 0-9 but the issue i have is making sure there is no more…

Dude2019
- 95
- 9
0
votes
1 answer
Canvas Scratchcard.. Co-ordinates
Hi can anyone help me out please.
So I am creating a scratchcard effect using canvas. When I make the canvas responsive by setting width at 100% using CSS the scratch co-ordinates seem off. Does anyone know how to fix this as I have set the canvas…

Aisling
- 1
0
votes
0 answers
Scratch card game using Pixi.js
I'm trying to create a Scratch Card game using PIXI.js 2D rendering library.
I have created a prototype using the Web Canvas api by creating a matrix of canvases and changing the pixel colours by using this method:
cavas2DContext.putImageData(new…

Mohamad Sidani
- 11
- 4
0
votes
1 answer
Javascript mouse event handlers not functioning properly on my android touch phone
I am working on creating a scratch card script in javascript
mouse event handlers is working properly on pc but it is not on my touch phone.
on pc , i hold down the left mouse button and move it around to scratch the card.
on touch phone , It…

wfareed
- 139
- 2
- 17
0
votes
1 answer
How to render random backgrounds with HTML5 Scratch Card
I am using HTML5 Scratch Card plugin and dont know how I can render random backgrounds with javascript.Here is the code
window.onload = function() {
createScratchCard({
'container':document.getElementById('circle'),
…

Ana DEV
- 1,018
- 2
- 17
- 39
0
votes
0 answers
how to go to another page after clearing the scratchpads?
I need to go to the next page when all the scratchpads are cleared but it doesn't work.
here i haven the code it is about it's long but it's like nine time the same code just for another scratchpad.
var cleared = 0;
//scratchpad1
var images…

Bramos
- 69
- 9