ScratchOffCard

[Main Features]: This Java applet uses your favorite image with scratch-off areas as the ticket background and makes it a fun lottery game.

[Execution Tips]: Click and drag the coin to scratch off the boxes. Once it reaches a specified percentage of the coverage of a box, it will link to a URL.
P.S. Please note that this is only a sample. No rewards are redeemable.

[Download and Installation Guide]: Be sure to read our FAQ 1 about license agreement before you use this program. Download and uncompress the file ScratchOffCard.zip under your web directory. You can use the configurator in the next section or do it by yourself as follows:
Use a file editor (e.g. WordPad) to open ScratchOffCard.html and copy the code segemnt between starting and ending APPLET tags into your desirable HTML file. Supply your own favorite image files and type in their names in the parameters.

[Parameters and HTML Configurator]:
Parameter Value Description
regcoderegistration code
loadingloading screen display toggle: 1 = yes, otherwise = no
cardscratch-off card image filename
scratch-off card image width
scratch-off card image height
toolscratch-off tool image filename
audioscratch-off audio filename
scsizescratch size in pixels
boxccolor of the scratchable boxes: R G B
boxbgbackground under scratchable boxes: R G B
Use "-1 -1 -1" for transparent background
boxfgforeground under scratchable boxes: R G B
boxdimdimensions of the scratchable boxes: width height
nboxestotal number of scratchable boxes
coordinates for all boxes: x y
nprizestotal number of all possible prizes
winning probabilities of all prizes (value between 0 and 1)
captions of all prizes
links of all prizes
'|' seperates gameover URL and target frame
* fill in "none" for URL if you don't want to link to anywhere
* target frame options are as follows
_self = current frame
_parent = parent frame
_top = top-most frame
_blank = new unnamed top-level frame
x = new top-level frame named x



Auto-generated code to be inserted into your HTML page:

P.S. Copy all necessary *.jar, *.class, images (e.g. *.gif or *.jpg), and data files (e.g. *.txt) to your web directory and embed the above code into your own HTML file.



[More Package Info]:
  • File Description:
  • ScratchOffCard.html - this example
  • ScratchOffCardbg.jpg - sample ticket image
  • ScratchOffCardtool.gif - sample scratch tool image
  • ScratchOffCard.au - sample scratch audio
  • ScratchOffCard.jar - ScratchOffCard program classes