A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: scratchcard problem

  1. #1
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322

    scratchcard problem

    Hi.

    I want to code a "scratchcard". Something like this:
    http://flashden.net/item/scratch-me-off/34545

    No problem...
    ...but I need to know how much of the area in per cent is being scratched free.

    Is this possible?

    Any ideas welcome.

    Thanks
    juggernart.com

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Not sure what you're asking. You can use just about any percentage that you see fit. In the example you provided, it looks like 33.3% of the coin dimension is being used for the scratching surface. Also it looks like only the left edge is being recognized. It would have been better if they provided a little more of an angle on the coin to give the appears of the edge scratching the surface.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322
    Thanks for reply.

    It's no matter of the shape of the surface being scratched off.

    My question was if there is ANY way to calculate the amount of surface that was scratched off.

    However, I got an acceptable solution from someone in another flash forum.
    He told me to divide the surface into squares that I can use to check if the mouse rolled over yet.

    Not very accurate, but better than nothing.

    Thanks
    juggernart.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center