hello, i was wondering how can i make a scratch off in flash? you know like the lottery tickets with something under after you scratch it.. Thanks for looking..
Put the image you want to reveal on a layer and then on the layer above cover it with loads of instances of a small movieClip which completely hide the original image.
Each of these tiny mcs contains a solid colour fill and an invisible button with this action..
on(rollOver){
disappear=true;
}
the tiny clip which contains the button has this event attached...
When the movie starts off the bottom layer is completely hidden. As you mouse over the area every one of the tiny clips doing the hiding is turned invisible in turn and the bottom layer is revealed. If you design the tiny clips to have rough edges it looks more like a scratch card effect.
Pretty neat!
How many different mini clips did you use? And how many instances did you end up with?
Used a function? Or re-wrote the script that many times?
There's about 50 mini clips. Sounds like a lot but since everything's done with a clipEvent it's not a problem: the variables are local so the clips don't interfere with each other and you don't have to give the clips instance names because they're self-contained and don't need to be addressed from the main timeline. As for rewriting stuff I just selected the clip and then dragged with "alt" held down to copy it - no typing required !
As for dynamically altering the mask I don't think it's possible: once the layer is configured as a mask layer it's locked and can't be altered. What you can do is put the mask into a movieClip and then mess about with the clip's propeties which will in turn affect the mask. Might be worth a bit of experimentation...
hey wangbar when i clicked on that link my nortons went off saying the temp internet file was infected with the NIMDA VIRUS i dont know if your infected or what but might want to check..
Hey wangbar thanks a bunch of the TIP man that works wonderful make sure you check on that NIMDA VIRUS hate to see good people like you guys to get a nasty VIRUS... I got another Question Is there a way i can make the movie i have with the scratch off have a icon for the pointer when is on the flash?? Thanks for the help
yeh i know, norton did not detect it and i had to dump some windows files that were infected from viewing that site..luckely i caught it in time..before it spread through my system..that's two viruses in the last month and a half..i'm getting a new virus program..any recomendations..
It's down. I swept my PC and site for NIMDA 2 days ago and my virus software said it was all clear. I've checked it again with McAfee and I have 2000 infected files!
HTML content of the site is down for the time being while I put my PC back together - sorry if anyone caught anything nasty...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.