Flash 8 Alpha Masking

The effect I would like to create is to make a child movie
clip that is not drawn while not positioned over the parent movie
clip. The effect should be like a windowed effect, where if the
child clip is partially over the parent clip, only the overlapping
portion is drawn.
I've gotten the desired effect by creating an image with a
transparent window and placing my components behind that image, but
this is not ideal because there is a lot of wasted space taken up
by the mask image.
I've also gotten the effect by using alpha blending. I
eventually created the following setup:
Base MC - blend: Layered
|-> my_background MC
|-> my_object MC
|-> masking MC - blend: Erase (lays over the whole
screen)
|-> my background MC - blend:Erase
so i erase my background from the masking MC, then erase the
masking MC from my base MC to get a my object it's children are
only drawn if over the top of it. The problem with this is that to
use this component in another movie i can't just import it into a
movie clip. Not to mention it is somewhat of a cpu hog.
Ideally, the alpha blend feature wouldn't only be
destructive, and I would be able to do something like this:
myMovieClip - _alpha=0 - blend:Layered
|-> child movie clips - blend:Layered
|-> MaskMovieClip - Blend:Alpha - _alpha=100 - (same size
as myMoveClip and displayed over the top of it)
so any child clips that stray outside of the bounds of
myMovieClip will be clipped
Is there any way to create a parent Movie Clip that only
draws the children if they are over the top of it, or to create a
child movie clip that is not drawn while not over the top of it's
parent?

yup - very common issue - asked and answered here practically
everyday for years:
http://www.keyframer.com/forum/viewtopic.php?t=479
~~~~~~~~~~~~~~~~
--> Adobe Certified Expert
--> www.mudbubble.com
--> www.keyframer.com
~~~~~~~~~~~~~~~~
nullstone wrote:
> Hello all,
>
> So I made some small SWFs with the alpha level of text
changing(tweened) to
> create some fading. Whenever I "preview" it in flash, it
looks fine, but once I
> export it to an SWF, it doesnt show correctly....the
alpha goes from 10% to
> 100% in one frame, with nothing for all the rest of the
frames...
> I tried converting the text into a symbol and tried to
alpha blend that, same
> results...
> Anyone have any ideas?
>

Similar Messages

  • Alpha-mask vs. merged-Transparency in PSD format

    Hi,
    I'm trying to read merged RGBA data from PSD format. "Image data" section contains channels (RGBAA... where first A might be a merged transparency or Alpha mask). Can someone tell me how to know what is stored in first A? I noticed that:
    when image contains no transparency, but has at least one Alpha mask, then first Alpha channel will contain that alpha mask
    when image contains transparency, then first Alpha channel will contain merged transparency and other Alpha channels will contain alpha masks
    So how do I reliably differentiate between Transparency and Alpha mask in first Alpha channel?
    Regards,
    Paulius Liekis
    Unity Technologies

    This forum is to discuss the forums, not products
    You need to ask your question in the forum for the Adobe product you are using
    How to Select a Forum http://forums.adobe.com/docs/DOC-1015

  • Animate Particles Using Image Source Alpha Mask - Outline

    I am trying to animate particles emitted from the outline of an alpha mask. I can get the emitter to see the mask, but only as a rectangular bounding box. How do I get the particles to be emitted from the organic shape within the mask? I created the alpha mask in Motion.

    Heya,
    I see what you're talking about: using the alpha for Fll or Random Fill seems to work fine, but using the alpha with Outline doesn't seem to work (except using the outline of the whole bounding box).
    Maybe a bug, though I would guess that generating an outline path from an alpha channel would be an expensive process, computing-wise. It makes sense if you have a relatively simple alpha with a single "blob" of solidity, but if you had a complex (noisy) alpha, it would be a royal pain to solve.
    Would be nice, though

  • Batch Process: Add Alpha Mask From File

    I did a search for this, but couldn't find anything.  If there is something, please feel free to send me in that direction.
    I use Photoshop a lot for my 3D work.  Usually, when I render an image sequence out, I have the mask saved in the alpha channel.  Unfortunately, ZBrush doesn't allow me to do that, and instead saves the mask out as a separate image.  I need to add the alpha mask to the color plate file.  Is there any way to do this with batch processing?
    --Andrew

    AndrewRaz wrote:
    Thank you for your response.  I guess for now, I'll just add the masks by hand, since I don't know scripting at all.
    It would be worth asking in the Scripting forum. There may be something available, in which case you just copy the file into the appropriate folder in PS and it's there on the menu to use.
    Scripting forum.

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Gradient alpha mask problem

    Hello-
    I am attempting to create a gradient alpha mask for a PNG file, the effect being that of a reflection fading out gradually into the background.  CS4 doesn't recognize the white to black alpha gradient or solid to transparent gradient.  It uses the entire gradient as the mask.
    I have searched and searched, but cannot figure out how to make a simple alpha gradient mask for an image.
    Any help would be greatly appreciated.
    Thanks.
    Jesse
    Artwork attahced for concept.

    You need to make the mask and the maskee movie clips, give them instance names, set cache as bitmap on both to true, and then use setMask to make the mask work.
    I believe pretty good directions are here: http://www.align.sk/blog/blog1.php/2008/10/23/transparent-masks-with-cacheasbitmap-as3
    For what it's worth, it's a well known enhancement request to have this work at author time in addition to runtime with AS (I for one sure hope we can add this).

  • Alpha Mask Limit?

    Hello, I recently just had a long problem that I could not
    figure out. I couldn't get a particular image to take an alpha
    blended mask. Since I've been able to successfully do this
    countless times prior (through both the timeline and AS), I wasn't
    able to find the reason why this particular image wouldn't accept
    it. Naturally, I went insane. If I had runtime caching checked, I
    would get no masking at all. If I had it unchecked, I would get a
    solid mask.
    I've narrowed the issue down to one factor and one factor
    alone, the physical size of the image. It doesn't matter the file
    size of the image being used, rather its dimensions in relation to
    the stage. Shrinking the image worked, blowing up any other image
    (as a test) makes it stop working again.
    My question is this: What's the largest size image we can
    alpha mask? Mine was 1608x259(original) and I was trying to scroll
    it across a 705x504 size stage. I didn't keep sizing down until it
    worked, rather I just cut it up at its current size, so I don't
    know yet this limit, but it's there.

    300thnickattempt wrote:
    > Hello, I recently just had a long problem that I could
    not figure out. I
    > couldn't get a particular image to take an alpha blended
    mask. Since I've been
    > able to successfully do this countless times prior
    (through both the timeline
    > and AS), I wasn't able to find the reason why this
    particular image wouldn't
    > accept it. Naturally, I went insane. If I had runtime
    caching checked, I would
    > get no masking at all. If I had it unchecked, I would
    get a solid mask.
    >
    > I've narrowed the issue down to one factor and one
    factor alone, the physical
    > size of the image. It doesn't matter the file size of
    the image being used,
    > rather its dimensions in relation to the stage.
    Shrinking the image worked,
    > blowing up any other image (as a test) makes it stop
    working again.
    >
    > My question is this: What's the largest size image we
    can alpha mask? Mine was
    > 1608x259(original) and I was trying to scroll it across
    a 705x504 size stage. I
    > didn't keep sizing down until it worked, rather I just
    cut it up at its current
    > size, so I don't know yet this limit, but it's there.
    >
    I could not reproduce the problem. For test I imported 2000
    by 700 pixels image.
    Set caching bitmap and mask using setMask action, animated
    the mask, animate the image
    and than the both in the same time.
    Variety of combinations, each time it work w/o problem.
    My guess is the file get somehow corrupted. FLA are very
    delicate and its common to
    experience unusually behaviors for no apparent reason.
    Try to do the same in new file see if happens again. Try to
    adjust the dimensions, make
    the image slightly bigger or smaller. Remove the image from
    stage, drag it from library
    to stage again and convert it to an instance movie clip.
    Sometimes the link between
    library content and stage get messed up.
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Alpha Mask

    Is there a way to use a grayscale image as an alpha mask? I'm trying to do lighting effects, also let me know if there is a better (or just easier) way to do lighting effects.

    Sure there is. Heres an example which takes an original image and sets the alpha or the destination pixel based upon the "grayness" of the mask pixel.
    -This assumes the mask image and src image are the same size.
    -White is maximum transparency, black opaque, and transparency in the mask image is ignored.
    import java.awt.Graphics2D;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import javax.imageio.ImageIO;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    * @author  Ian Schneider
    public class AlphaMask {
        public static final void main(String[] args) throws Exception {
            BufferedImage orig = ImageIO.read(new File(args[0]));
            BufferedImage mask = ImageIO.read(new File(args[1]));
            BufferedImage out = new BufferedImage(orig.getWidth(),orig.getHeight(),BufferedImage.TYPE_INT_ARGB);
            for (int y = 0, yy = out.getHeight(); y < yy; y++) {
                for (int x = 0, xx = out.getWidth(); x < xx; x++) {
                    int argb = orig.getRGB(x,y);
                    int grayness = grayYIQ(mask.getRGB(x,y));
                    argb ^= grayness << 24;
                    out.setRGB(x,y,argb);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
            f.getContentPane().add(new JLabel(new ImageIcon(out)));
            f.pack();
            f.setLocationRelativeTo(null);
            f.show();
        static int grayYIQ(int rgb) {
            return (int) (
              ((rgb >> 16 & 0xff) * .299) +
              ((rgb >> 8 & 0xff) * .587) +
              ((rgb & 0xff) * .114)
    }There is probably some other, easier way, but hey, I learned a cool gray algorithm in the process...

  • Merging alpha masks

    Hi,
    I have about 10 layers that I want to merge together.  Each layer has its own individual alpha mask that doesn't overlap each other.  I was wondering if it's possible to merge all the layers onto one while preserving an alpha that encompasses all 10 alpha masks as well.
    Thanks. 

    I am not sure how the merged alpha channel will help you and I am pretty sure if you applied that combined alpha channel as a layer mask on the merged images that you would not get the same result as a Merge operation (Michael already mentioned this above). In the layer stack, each Layer Mask operates wtih the existing layer and the next lower layer (with all other layer settings) to determine the Composite image to present to the next higher  Layer and Layer Mask.  The masks are not directly working in a cascade fashion with each other directly from a conceptual point of view (IMHO of course).  That is why preserve only keeps the bottom Layer Mask. All the other masks were merged into their respective Layers druing the merge process (except the last one).
    That given, if you want to create a composite mask for some purpose that I do not understand (very likely) then here is how you can do it:
    - Make sure that selections are cleared
    - On each Layer, add the Layer Mask to the selection
    - After all Layer Masks have been added to the selection, either a) save selection as a) Channel Mask or b) create a new Layer Mask on its own independent layer from the selection.
    At this point you have the combined mask as you requested either in the channels panel or as an independent layer mask.   You can do the merge without preserve set and still have a combined mask as you requested to be used whereever.
    Hope this is helpful and if I just don't  understand your request I apologize for taking up your time.   If I am off base, it may be helpful to describe what you want to achieve with your image as opposed to just what operations you want to execute.  I sense other forum members don't quite understand the end result you want to achieve.  I am sure you will get lots of suggestions once forum members understand the end image objectives.  Good luck.

  • Alpha mask artifacts

    this may be a very simple question.
    Here it is:
    All is done with AS.
    I am applying a gradient mask to a movie I am animating. When
    it changes property line alpha x or y there are white outlines that
    appear. Is there a way to prevent that from happening.
    Any support is much appreciated.
    Please let me know if you need more info.
    Here is a link to a sample image of the problem.
    Link to
    example
    Cheers

    Narrowed it down to the following:
    Draw a circle on the stage and convert it to a movieclip. Name it for example "my_mc". Apply a motion tween to it from e.g. left of the stage on frame 1 to right of the stage on frame 20. Test it and the circle moves.
    Now apply this code on frame 1:
    my_mc.cacheAsBitmap=true;
    Test it again: the circle doesn't move; it freezes on its left position of frame 1.
    I'm using a actionscript 2.0 document in Flash CS3 with it's publish setting on 'flash player 9'. It works when I start a actionscript 3.0 document, but I want to use it in a 2.0 one. When I start a 2.0 document and change the publish setting from its default 'flash player 9' to 'flash player 8' it works???
    Why doesn't the tween work when I use a AS2/FP9 work, but it does work when I use a AS2/FP8 document? Is this some bug of FP9 in combination with using cacheAsBitmap?

  • Flash 8 Masking

    I have been using masking in Flash 8 to creating handwriting
    and drawing effects. A few weeks ago I had to replace my computer
    and ended up getting Vista as the OS, now the effect won't work any
    more. Are there any known issues with masking and Vista? If so, is
    there anything I can do to fix it, other than getting CS3?
    Thanks so much for any help!

    reposting to see if anyone has had this problem.

  • Flash Show Mask Question

    Hey Guys,
    I was wondering if a Flash person could help me with
    something. I am creating (or trying to at least) a Flash show that
    begins with a logo being slowly unmasked:
    http://riverahotelsouthbeach.com/allie/index.html
    But then I wanted to add photos of our hotel....kind of like
    what's on the other pages but I want to make it one show. Now I
    managed to make the masking effect work ( ok it's no Steven
    Spielberg effect but at least it works ).
    Now I inserted the actionscript on the mask timeline to stop
    the show from looping....
    But now when I go to insert a new layer with let's say
    Photo1..it won't show. I can see it work on my timeline but not
    when I test the show.
    I have my fla file here:
    http://riverahotelsouthbeach.com/all.../riviera_logo/
    Can someone help please? Thanks!!!!

    I use swfObject for Flash detection. It's easier to control
    than the Adobe solution and allows you to provide plain html
    alternate content:
    http://blog.deconcept.com/swfobject/

  • Import image as a mask or How to use an alpha mask for transparency mask

    Hello,
    Basically I need to know how to import 1 image into another image as a mask.
    What I'm trying to do:
    I have a bunch of large images that put together make 1 very large image (ortho land images). I also have corresponding images, lets refer to them as mask images, that would mask out parts of the large ortho image I want to import it too. These mask images basically look like a PS mask. They are feathered black to white images. I need to be able to import them as a mask.
    Is there away, if so how?
    Thanks!!!!

    If the masked out areas of your image are to be black, see if this approach fits your needs and forget about creating a mask. Instead bring your "mask image" into your ortho land image using your favorite technique. Now change the blend mode of this mask image to mutiply. You should now see land wherever your mask is white, black where the mask is black and transition regions where the mask has a gray value.
    Alternatively, you can make an alpha channel if you want by turning off all layers except your "mask image", switching to the channel palette, Ctrl clicking on the rgb channel (to create a selection) and then clicking on the Save Selection as Channel icon at the bottom of the palette. You can then create a luminance mask by going back to the layer palette, selecting the layer you want to mask and click the Add LAyer Mask icon at the bottom of the palette.
    Paulo

  • Alpha masks

    I searched everywhere for a tutorial explaining how to make an image with an aplha mask ( not uniform transparency ) Can you hel me?

    Do you mean making an image that is a mask, or making an image using a mask?
    To create an image that will be used as a mask, start with a new BufferedImage having an alpha channel (like TYPE_INT_ARGB). Then draw into that image using any of the Java2D primitives, employing transparency either in the color value or an AlphaComposite. Note that the actual color is not important, only the alpha value will be used.
    To then use that image as a mask, simply set an alpha composite type of "source in." After that, anything you draw into the image will be constrained by the alpha values of the image.
    For example, the following will create an image with a large letter "A" and draw another image into just the pixels occupied by the letter. Since a BufferedImage with an alpha channel is initialized to all transparent, only the visible pixels within the letter will be used to mask the second image.BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
    Graphics2D g = bi.createGraphics();
    Font f = new Font("sansserif", Font.BOLD, 140);
    g.setFont(f);
    g.setColor(Color.black);
    g.drawString("A", 0, 100);
    g.setComposite(AlphaComposite.SrcIn);
    g.drawImage(anotherInterestingImage, 0, 0, null);

  • Flash gradient mask problem

    Having a bad day everything i do doesn't work today... I am trying to create a gradient mask but because its not on the main timeline also its in a nested swf, just can't get it working, this is what I was using and tried it with _parent.(instanceName) and _root
    clip.cacheAsBitmap = true;
    mask.cacheAsBitmap = true;
    clip.setMask("mask");
    Any ideas
    Rich

    mask shouldn't be in quotes.
    if removing the quotes doesn't solve your problem what's the following show:
    clip.cacheAsBitmap = true;
    mask.cacheAsBitmap = true;
    clip.setMask(mask);
     trace(clip);
    trace(mask);

Maybe you are looking for

  • Confirmation of Prd order

    Hi Friends, While i am tryinhg to do confirmation of prd order, i am getting this error  "No prices could be determined for object Activity type 1000/9999/xxxxxx" I am maintaining the prices in KP26 for the above activity. While i am trying to save t

  • AirPlay and 2 apple tvs (streaming only to one at a time) - possible?

    Very brief question. I am thinking of getting two Apple TVs - one for the liing room and one for the bedroom, with a view to streaming any films etc i have on my iMac to the device. I've googled and can't find any reference to whether 2 apple tvs is

  • Automatic captioning in CS 5.5

    I understand that PP CS 5.5 will have captioning integration, finally. Is there a way to take the output of speech recognition files from PP (xml) and reformat them into the input file required for this function (.mcc or .scc)?

  • Superdrive not showing up

    It just stopped working. Like it doesnt exist. But using About this Mac, it shows up under system report> USB as existing: Apple USB SuperDrive:   Product ID:          0x1500   Vendor ID:          0x05ac  (Apple Inc.)   Version:           2.02   Seri

  • Quictime crashes ie7 and also when attempt to check for software updates XP

    I have recently changed my pc and am attempting to install quicktime on the new computer. It is a windows XP computer. Quicktime 7.2 is installed, but when I attempt to open a web page with a quictime movie, internet explorer crashes with the followi