Groups » Flash Maniacs » Topics » [T] Alpha Masking

Listing 1-7 of 7    1   of  1
Author Message
.

M/18
Las Vegas,
Nevada
Instant Message
Send Message
Reply with this quote Reply to this Post Posted:  Mar 27, 2007 2:16 AM
FLA

Create 3 layers.

Name the bottom layer "pic", the middle layer "mask", and the top layer "actions".

Import The picture you wish to mask into your Library by selecting File > Import to Library. Select the layer "pic", and drag your imported picture onto the stage. Then center it.

On layer "mask" select the circle tool and draw a small circle onto the stage, and center it. Make sure you dont have the stroke selected.Select the circle and open the color mixer by hitting shift + F9. Select the type radial. Select the white tab on the color slider and set the alpha to 0%. Drag the black slider close to the center.

On the layer "actions", you will put in this actionscript:
pic.cacheAsBitmap = true;
mask.cacheAsBitmap = true;
pic.setMask(mask);


Convert your main picture and the circle into movie clips. Give the circle an instance name of "mask" and the picture an instane name of "pic".You may now tween the circle anyway you wish.

*note*
Make sure all of your layers start and end on the same key frame. And dont forget a stop();
Ryan


M/22
Denver,
Colorado
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Mar 27, 2007 4:43 AM
good tutorial tucker
Flash Mod


M/22
,
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Mar 27, 2007 4:55 AM
I'm going to call this "gradient masks" on the group tutorial section, because that might help people know what it is a little better.
.


M/18
Las Vegas,
Nevada
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Mar 30, 2007 2:16 PM
should i make some screen shots??

i thought it was simple enough but maybe not
Ryan


M/22
Denver,
Colorado
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Sep 23, 2007 11:18 PM
why the hell won't this code work all of a sudden.... :(
mike


M/23
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Sep 24, 2007 12:27 AM
Colorado Boy wrote:
why the hell won't this code work all of a sudden.... :(


cause god hates you.

AS3 or AS2? i dont see why it should stop workin,
Ryan


M/22
Denver,
Colorado
Instant Message
Send Message
Reply with this quote Post a reply to this Topic Posted: Sep 24, 2007 1:23 AM
AS2

content_mc.cacheAsBitmap = true;
mask_mc.cacheAsBitmap = true;
content_mc.setMask(mask_mc);

the stuff inside the content_mc is a bunch of movie clips that load pics via xml. I thought maybe it had to do with the xml but I took out all the xml AS and it still had no effect and the gradient mask didn't work. I know I have given both mc's the correct instance names so....idk
Listing 1-7 of 7    1   of  1

dspPostReplies v29