Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-02-2003, 06:01 AM   #1
carlhusic
Registered User
 
Join Date: Dec 2002
Location: Scottsdale, AZ
Posts: 22
Question need help with transparency gradient in mask layers

I'm working with Flash 5 (will buy MX upgrade if I regain employment).

I am trying to use transparency gradients in a mask layer for a
spotlight effect over another layer containing an image.

I create a circle with a radial gradient, setting the alpha on one
end to 0 and to 100 on the other end.

When I test the movie, the circle area in the mask, revealing the
layer under the mask has hard edges - I cannot get
a transparency gradient effect.

If I make a regular layer over the image area and use a gradient
with the inner part at 0% and the outer part at 100%, and
fill the remaining space on the top layer with the solid color,
it works just fine.

Shouldn't I be able to use the alpha gradients on a mask layer
and get a mask with diffuse edges? Is there some trick to this?

Thanks,
Carl

Last edited by carlhusic; 01-02-2003 at 06:08 AM.
carlhusic is offline   Reply With Quote
Old 01-02-2003, 07:28 AM   #2
bembino
Registered User
 
Join Date: Dec 2002
Location: NYC
Posts: 76
Send a message via AIM to bembino Send a message via Yahoo to bembino
Default

Masks can't have alpha values. People that do it use a work around of sorts that duplicates a masked clip increasing its size while decreasing its alpha value. Then make sure all the duplicated clips are lined up.
bembino is offline   Reply With Quote
Old 01-02-2003, 03:19 PM   #3
carlhusic
Registered User
 
Join Date: Dec 2002
Location: Scottsdale, AZ
Posts: 22
Wink transparency gradient in mask layers

Thanks bembino -

I guess the book I was reading lied to me then (not the first time)

So I create multiple masks overlaying each other each with an
increased alpha value - OK, I'll give that try.

Basically I'll want to write actionscript to detect cursor position
and move the spotlight with the cursor (I know, it's a realtively
fundamental thing). I noticeed that if I put a rectangle with a
gradient hole in it over the image layer, I also get the effect I
want.

So what would be more efficient, code-size and processor-usage
wise - to make multiple masks that follow the cursor, or one
overlying layer containing a large rectangle with the hole in it?
carlhusic is offline   Reply With Quote
Old 01-02-2003, 03:41 PM   #4
bembino
Registered User
 
Join Date: Dec 2002
Location: NYC
Posts: 76
Send a message via AIM to bembino Send a message via Yahoo to bembino
Default

I would say moving the large fill with a gradient hole in it would probably be fastest. You're moving one object vs 4 to how ever many objects with alpha values.
bembino is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:59 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.