Public Voice Network
- Pic of the Day 1051610516
- Lets get Lloyd a girl! 2626
- smart hot chicks 3333
- FMT 120508 4242
- Canon EF 70-200 f2.8 2121
- Pictures of Girls With He… 1616
- Illustrating... 1515
- God is quite busy 133133
- Seattle Tattoo 66
- facebook virus 33
- stickers for everyone 7171
- Least favourite brands 4747
- question for photographer… 1212
- Triangle logos 4848
- ooh, haai! 1818
- Property 2727
- ffffound invite swapshop 529529
- Blowing your nose 3232
- unicorn logos 6161
- blog 3131531315
- Tom Sachs: Custom Sharpie 1010
- speak russian? 1010
- design thread 147147
- QBN 3333
Gradient mask in flash 99 Responses
Last post: 10 months, 2 weeks ago | Thread started: Jan 25, 08, 2:45 a.m.
- randalldon
If you're using Flash 8+ (as2) you can do as skt says (black mc with hole cut out). You can use this as a gradient mask by applying a blur to the mc (with as2 or on the timeline). If you want any animation on the mask this will need to be done within the mc.
Once you have the blur applied to the mc and any animation sorted give the mask an instance name eg "maskInstance" and give your mc an instance name eg "mcInstance". Then is the first frame actions on the main timeline put this code:
mcInstance.setMask(maskInstance…
The final stage is to make sure you have "use runtime bitmap caching" ticked in the symbol properties for both the mc & the mask.
You should be good to go from there.
Hope it helps!

- Dog-earJan 25, 08, 3:24 a.m. – Permalink
- randalldon
Apologies missed the closing bracket - first frame code should be:
mcInstance.setMask(maskInstance…


- Dog-earJan 25, 08, 3:25 a.m. – Permalink
- randalldon
I see QBN won't let me put the closing bracket in - the last part should be (maskInstance)


- Dog-earJan 25, 08, 3:27 a.m. – Permalink
- tbgd
There's some source to do it very easily here. http://www.whatdoiknow.org/archi…
Thanks to Todd Dominey.

- Dog-earJan 25, 08, 5:26 a.m. – Permalink
- Bullitt
Thanks for the advice guys!
Another question if you can help.
The idea behind this spotlight effect is for it to highlight areas of a graphic by using some buttons you rollover to navigate, either left or right. I'm shit with actionscript, can anyone direct me to a good tutorial that will allow me to scroll a graphic left or right.?What I got so far is a spotlight gradient effect, static. underneath is a movie clip which I will want to move either left of right ( areas of which will be highlighted underneath the spotlight gradient.)
Cheers,


- Dog-earJan 25, 08, 5:45 a.m. – Permalink

