View Full Version : [AS2] Scratch off effect question
mikes02
09-04-2008, 04:10 AM
I want to do a scratch off prize flash where the prize is hidden below a layer that is scratched off, like this:
http://www.tutorial5.com/content/view/115/46/
however, i want the scratch off to basically play on release, so that if someone clicks (maybe an invisible button on top of the game??) then it just automatically scratches off and reveals what is below?
any ideas/help would be greatly appreciated, thank you!
atomic
09-04-2008, 04:32 AM
Have the scratch brush (or shape) diagonally do it's scratching from bottom to top, from left to right, and move it across the scratched area changing it's x coordinate, by the scratch brush's width, each time it reaches the top y coordinate...
drumn4life0789
09-04-2008, 06:57 AM
certain things seem easier to just do in the timeline. make a movie clip that does this.
mikes02
09-04-2008, 04:04 PM
certain things seem easier to just do in the timeline. make a movie clip that does this.
How?
atomic: The actionscript from that tutorial site seems to be primarily designed for that particular application, I am not sure how to alter it in such a way that it would automatically scratch it off.
atomic
09-04-2008, 04:08 PM
Can you attach your own .fla?
mikes02
09-05-2008, 05:00 AM
Can you attach your own .fla?
I will probably work on one this weekend, I was doing research first. Just to give you more of an idea, I want to embed it with a transparent background (most likely using swfobject embed) and then once the flash is scratched off it will reveal whats underneath which will most likely be PHP feeding in some type of randomly generated prize.
hopefully that makes sense, i'm tired :p
mikes02
09-15-2008, 06:47 AM
it's been a while, finally got around to working through the tutorial
some things I don't like about it:
1) it's making me use two images, one for the front that you scratch off, and one for the background image, and after playing with it, it seems like it has to be kept this way.
2) i like the scratch off effect and the fact that you can change the diameter of the scratch off, but i want to make it scratch automatically, not manually, and i want to have it erase to just the regular flash background, that way i can use swfobject to set a transparent background and display game results dynamically behind the flash file when it's done scratching.
I hope this makes sense, i'm typing this out and fighting to stay awake at the same time ;)
thank you in advance for any help!
Can you attach your own .fla?
atomic
09-21-2008, 03:01 AM
Here somewhat what I had in mind when talking of wiping out the image...
Not exactly a scratchoff effect, but still interesting, and it doesn't use 2 pictures... When you wipe out the cover, it reveals the underlying .html page content...
Keep hitting the dark blue button, to view and cycle through the different wiping patterns... I prefer the left to right diagonal one...
Of course, it presently happens on the button press, but could happen automatically on some condition...
http://oldnewbie.110mb.com/public/mikes02/basic.html
mikes02
09-24-2008, 04:28 AM
Here somewhat what I had in mind when talking of wiping out the image...
Not exactly a scratchoff effect, but still interesting, and it doesn't use 2 pictures... When you wipe out the cover, it reveals the underlying .html page content...
Keep hitting the dark blue button, to view and cycle through the different wiping patterns... I prefer the left to right diagonal one...
Of course, it presently happens on the button press, but could happen automatically on some condition...
http://oldnewbie.110mb.com/public/mikes02/basic.html
Very cool, thanks for posting that atomic!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.