Copy link to clipboard
Copied
Okay. Basically, I need a flashlight effect on my game, kind of like wherever your mouse goes, it looks like you are holding a flashlight there and it can reveal hidden things.
I used a tutorial on how to do it, and it worked O.K... Basically my primary objective was there would be text and it would be masked until the cursor passed over it and you could see. It didn't work at first but when I changed it from input text to static text it worked... sort of.
It only worked for the first thing I put there. If I put 7 different text boxes, it would only reveal the first.
Here is the video: http://www.youtube.com/watch?v=6UCbQojCkwE
If you don't want to watch the video, it basically says to create 3 layers, the top layer being an action layer, the second layer being where you mask stuff, the 3rd layer being where the flashlight is put.
Action layer = Put code to make flashlight follow cursor
Mask layer = Put stuff that you don't want visible until flashlight is over it
Flashlight layer = Put the flashlight in this layer
And you right click the 2nd layer, and check "Mask" and it should work
But I still have the problem that it only works for the first text box...
If any of you guys could help me figure out why it only works that way, or supply me with an alternative way to replicate a flashlight effect, please do ![]()
Thanks
-Spaghetee
Copy link to clipboard
Copied
embed your font.
Copy link to clipboard
Copied
I did embed the font, it only works for the first text box that I put
Copy link to clipboard
Copied
and you're masking a parent of the 7 textfields? or you're masking something else?
Copy link to clipboard
Copied
I'm not familiar with the term "parent", what I did was I put all the 7 textboxes in one layer and masked that layer
The flashlight layer is below the layer with the hidden textboxes
Copy link to clipboard
Copied
If the flashlight layer is below the text layer, how can it ever be above the text to mask it? THe flashlight layer should be the one assigned as a mask, and it should be above the text layer when you assign it.
Copy link to clipboard
Copied
Now it works but it doesn't have the cool flashlight effect (the illusion that your cursor is really a flashlight), and I would like for it to be like a flashlight in the sense that if you are directly over it the text is brighter than if you were adjacent to it...
Out of the frying pan and into the fryer ![]()
EDIT: Would there be a way to make a transparrent unmasker on the flashlight layer and another layer below the text layer to have the flashlight effect and the unmasking effect?
Testing it, but I don't know how to make a transparrent bubble
Copy link to clipboard
Copied
use this:
www.kglad.com/Files/forums/mask.fla
Copy link to clipboard
Copied
I guess my question has been answered, kglad- I found your answer helpful but it produced the same results (essentially) as before- The cool flashlight effect is something I'm willing to sacrifice for the revealing of more than one textbox
Thanks guys ![]()
Copy link to clipboard
Copied
all the textfields are revealed by the mask in the linked file.
Copy link to clipboard
Copied
From what's described, I think the desired effect that might be missing is the making use of a radial gradient/cacheAsBitmap type stuff such that a fade is realized as you near the outer area of the mask.
Copy link to clipboard
Copied
oh.
if you want to use an alpha fade in a mask, you must mask a movieclip (ie, attach your textfields to a movieclip) and enable the cacheAsBitmap property of both the mask and masked movieclips.
Copy link to clipboard
Copied
Yeah, I do wish to use the "radial gradient/cacheAsBitmap type stuff such that a fade is realized as you near the outer area of the mask" ![]()
A few things I don't understand here though
1. How do I mask a movieclip?
2. How do I mask the unmasker? (The gradient circle)
3. How do I enable the cacheAsBitmap?
Thanks ![]()
-Spaghetee
Copy link to clipboard
Copied
same link shows one way to use a alpha-gradient mask
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more