Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com

place your ad here

Web Premium



Get Qwest High Speed Internet



Gradient Masks in Flash

October 23rd, 2007 . by polyGeek

To create a gradient mask in Flash apply bitmap caching to each of the mask and maskee MovieClips and then use setMask() to apply the mask. As such:maskMC.cacheAsBitmap = true;
img.cacheAsBitmap = true;
img.setMask( maskMC );

Here’s an example:

Download FLA

WhatDoIKnow.org has a nice writeup with comments on the topic. By the way, you can do this same effect without code but it seems like a lot more work to me.

I only need to do this about once a year and I always end up spending an hour going, “how the frak did I do that last year.” Now next year when I need to do this again I can just search my own blog. If I remember that I wrote about this. :-)

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

2 Responses to “Gradient Masks in Flash”


comment number 1 by: Bjørn

Nice one, Dan :-)


[...] very easy to create a gradient alpha mask using code. But sometimes you have to do it the gold old fashioned [...]

   Welcome back (Change)

Leave a Reply

comment feed RSS   subscribe to this comment thread

Recent Posts

   



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud