Actor Image mask - wiping the mask on

I've tried searching for 'actor mask with gamesalad', 'actor image mask with game salad', and 'image mask with gamesalad', but can't seem to even find the fundamentals for creating a mask on game salad.
Basically, I would like my final result to look like something splats on the screen, and then the player wipes it off with their finger which is where the masking part comes in.
Basically, I would like my final result to look like something splats on the screen, and then the player wipes it off with their finger which is where the masking part comes in.
Comments
Whatever you want to do, it has to be done with the actors, maybe you have to play with the opacity and the order of the layers.
If you have an image or a video where there's something similar of what you want to achieve, show us.
I'm playing a 1st-person racing game on my iPhone. Oh no! A bug has hit my windshield and covered the screen with goo; I can't see! I need to rub my finger across the screen to clear the goo away.
The mask would be over the "Goo" actor which is an image the size of the screen. Where the mask is, you can see the "Goo". Where there isn't a mask, the goo is invisible. Wherever I touch the screen, the mask is removed and the goo becomes invisible in that area. I need to wipe the entire screen to see the race again.
And you fill the screen with this kind of actors (make sure your actors layers are on top). Then make what RKS said. and when you touch them, destroy the actors (you can make an animation to it, like fading or exploding). And that's it
Hope it helps
When actor receives touch inside, set "self.touched (boolean)" to true
When actor receives touch outside & when self.touched is true
change attribute self.color.alpha to self.color.alpha - .33 (or whatever factor you want)
change attribute self.touched to false
When self.color.alpha <= 0, destroy
If you're going this route I'd also set its linear velocity Y to something negative so the "smear" runs down the screen, and also destroy it after its position is something (like less than or equal to -50)
You might not need the first attribute if the touched outside event requires that it was initially touched. I'm not sure, since I don't really play with it too much.
Edit: Yeah you do need the touched attribute, however, the cool thing is if you wipe on and off with this method you can remove it with three swipes while keeping the same finger press down the whole time. Looks good.