Nested gradient mask

This code works fine when its on the main timeline.
mc.cacheAsBitmap = true;
theMask.cacheAsBitmap = true;
mc.setMask("theMask");
If I nest it in movieclip is does not work. I've searched thru numerous threads and didn't find the answer. Any ideas?

Yes the code.
1. Created a new movieclip in the library; we'll call it 'maskedClip'
2. Use the same code, the same mask and mc
3. drag on to the main timeline
4. testMovie
= Mask not working.

Similar Messages

  • 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);

  • Printing a graphic with a gradient mask in Flex 3-problem

    Hello, I am fairly new to flex development. I am puting together a little program that allows the user to upload a picture add a vignette mask in order to achieve a soft edge,  and have a problem I cannot  find an answer anywhere, maybe someone could help me please.
    I want  to print a the user photo with a gradient mask or vignette from flex. I managed  to show the image correctly on screeen with the gradient mask using  this class but the output to paper is a rectangle without the soft mask.
    //package to add the mask for display
    package com.dm.graphics
       import flash.display.Graphics;
       import mx.containers.Canvas;
       import flash.display.GradientType;
       public class FrameBorderSoft extends Canvas
          override protected function updateDisplayList(w:Number, h:Number):void
             super.updateDisplayList(w,h);
             var g:Graphics = this.graphics;
             g.clear();
             g.beginGradientFill(GradientType.RADIAL, [0x000000, 0x000000, 0x000000, 0x000000],
             [1,1,0.8,0],
             [1,128,195,255],
             horizontalGradientMatrix(0,0,w,h) );
             g.drawRect(0,0,w,h);
             g.endFill();
    It  works beautifully until I try to print the graphic. The image prints  but without the gradient edges (soft) instead it is just a sharp edge  rectangle.
    Does anyone know how to do this?
    Here is my print function:
    private function doPrint():void {
                    // Create an instance of the FlexPrintJob class.
                    var myPrintJob:FlexPrintJob = new FlexPrintJob();
                    // Start the print job.
                    if (myPrintJob.start() != true) return;
                    // Add the object to print. Do not scale it.
                    if (tabnavigator1.selectedChild == img1) {
               //switchcolor is a variable to detect if the user changed the background to white or clear.       
                             switchcolor = 100;
                          //printCF is the card front container with the photo masked
                       myPrintJob.addObject(printCF, FlexPrintJobScaleType.NONE);
                       myPrintJob.printAsBitmap = false;        
                    } else if (tabnavigator1.selectedChild == img1b) {
                       switchcolor = 100;
                       myPrintJob.addObject(printCB, FlexPrintJobScaleType.NONE);
    I hope this helps to visualize,
    I would greatly appreciate any assistance or advise.

    Hello, back on my issue, i tested a little bit more the message dispaching.
    I read the lazyLoadPolicy class and noticed that it always has to have a ModuleId property in the message to work, that's why the broadcast message didn't work to awake the module with the lazy loading policy.
    So i added copy of my module:
         <cairngorm:ParsleyModuleDescriptor objectId="test"
              url="TestModule.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />
         <cairngorm:ParsleyModuleDescriptor objectId="testbis"
              url="TestModuleBis.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />     
    Set them both with a basicLoadPolicy, and tries to dispatch a message to only one of them using the ModuleId metatag. I then noticed that both modules received the message and not only the one i expected.
    I then changed the ModuleMessageInterceptor configuration to dispatch to only one kind of module:
    <cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }" moduleRef="test"/>
    and this worked as expected. Only the first module catched the message. I am obiously messing with the ModuleId metatag but i cannot see what's wrong...
    I compiled with
    -keep-as3-metadata+=ModuleId
    but this hasn't changed anything...

  • How to create gradient mask in CS3 ?

    Is it possible to create gradient mask without programming?
    It is important
    that Flash document must be created in version 9 and AS3. I
    tried to use
    blend modes alpha/erase but they makes object invisible
    (cache as bitmap was
    on and off - every combination of 2 used objects).
    Flash document used for test cosist of 2 MCs:
    - top layer: contains MC with filled by gradient rectangle.
    First color is
    black with alpha 100%, second color is black with alpha 0%.
    - bottom layer: MC containing photo
    I want object on top layer to be a gradient mask.

    Is it possible to create gradient mask without programming?
    It is important
    that Flash document must be created in version 9 and AS3. I
    tried to use
    blend modes alpha/erase but they makes object invisible
    (cache as bitmap was
    on and off - every combination of 2 used objects).
    Flash document used for test cosist of 2 MCs:
    - top layer: contains MC with filled by gradient rectangle.
    First color is
    black with alpha 100%, second color is black with alpha 0%.
    - bottom layer: MC containing photo
    I want object on top layer to be a gradient mask.

  • Revolution Main Screen Gradient Mask

    I'm authoring a DVD in iDVD 7.1.2 (latest version with iLife '11).  I want to use the Revolution Theme with an image in the overall screen behind the chapter buttons.  Unfortunately for me, the theme has a black gradient mask over the screen and the image that I inserted is extremely dark.  Is there some way to edit the details of the Revolution Main screen?
    Thanks,
    Dave

    There's a menu title which is the rotating text.  Change it and the rotating text will change.
    OT

  • Need help with gradient mask over XML images

    I have a file that works great in pulling images via XML
    data. I want to create a gradient mask using flash CS3, but i can't
    seem to get any sort of mask (solid or gradient) to react with the
    XML driven images.
    Download my FLA
    and other working files
    845 kb

    granted i can see resizing the mask and now it responds...
    however, take a look at this
    Sample of alpha gradient mask:
    http://www.devx.com/webdev/Article/29296#codeitemarea
    i'm trying to this type of mask (static mask obviousl)

  • Drawing artifacts with motion under a gradient mask

    Hello,
    I am having an issue with using a motion under a gradient mask and was hoping someone might have a solution. I have a  transparent png bubble in movie clips that are being randomly sized and  animation started using code. The design has a reflection and I am  using a gradient mask for the effect. The issue is when the bubbles  animate they are causing drawing artifacts. Please see the attached  screen shot or you can see the swf here - http://archetypeworks.com/test/tm/. Below is the code I am using to set the mask. Any help or  suggestions are appreciated.
    Code:
    bottomMask.cacheAsBitmap = true;
    beaker_bottom.cacheAsBitmap = true;
    beaker_bottom.mask = bottomMask;
    Thank you,
    Ococ

    Thank you for the suggestion, but that did not work. I also tried breaking apart the png, using the magic wand to select and delete the transparent areas. Still getting the same issue.

  • Why my gradient mask at home renders smooth, but is clipped at work?

    I created a number of gradient masks applied to images with a basic 100 to 0 black gradient, on my Mac at home. They look smooth in Illustrator, and rendered smooth both as a PDF and exported to a PNG.
    Gradient Mask from my Mac at home:
    But when I open the same illustrator document on my Mac at work the gradation of the mask is clipping. So instead of a smooth transition there's now a hard line.
    Gradient Mask on my Mac at work:
    This is the same file, opened on different Macs. Both identical versions of Illustrator CS6, identical color settings, identical color profiles.
    The main differences are my Mac at home is a 2009 MacPro running OS 10.9, and my Mac at work is a 2008 MacPro running OS 10.8.
    I've created and recreated gradient masks over and over again, and I cannot get a smooth transparency gradient mask at all on my Mac at work.
    This presented a problem, as the client had to have last minute revisions when I was at work, and could not produce a smooth image, I was forced to deliver the final graphic with clipped gradient masks.

    So deleting preferences didn't fix it. I even rasterized the gradient to see if an image mask would work better, that didn't work. Then I toggled "invert mask." I was suprised to see that once I inverted the mask (which reversed the gradient), the transparency was smooth from 0 to 100.
    So I've figured out a work around for the problem, but it's still not resolved.
    Invert gradient mask
    Rotate gradient mask 180°
    Adjust gradient mask break points to accomidate reversal
    Here's the result:
    Now if someone can explain to me why a gradient mask doesn't work in one direction, but it does when it's inverted.

  • Applying a gradient mask to type to create a reflection

    I working with CS4 Windows and am applying a gradient mask to unrasterized type to create a reflection. I've flipped the type, chose gradient tool, have chosen foreground to background, foreground to transparent, etc. The mask layer keeps acting like a "normal" layer and instead of masking out the part I want masked, it darkens that portion. I've even verified my method with tutorials and come up the same problem. I figure there's something I have either checked or unchecked but I can't figure out what. If I use another tool to mask part of the type it works fine. I'm really baffled.

    You either want a proper layer mask, or to create a clipping mask. You might try posting a screenshot of your layers panel if you're still stumped.
    More about layer masks here:
    http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-7866a.html
    More about clipping masks here:
    http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-7853a.html

  • Need to create a 'gradient mask' using a b&w photo image.

    I have not created a document yet and would like some thought on how to do this: I want to use a continuous tone black and white image which is somewhat close to what would be a 'knockout' but with soft edges - so it gradates appropriately over the background image I want to use, making the black part of the image used as the mask become much of the effect of a gradient mask: the background image shows through whereever there is the 'black' and 'tone' of the image. I hope this makes sense.
    my first thought is to create a layer mask and then paste the black and white image onto that, but I'm not sure if that will work to accept the 'soft tones' of the image and work appropriately.
    Has anyone had experience with this type of thing that they can share what steps I should take to make this effect work?
    TIA,
    Ken

    Doug.S wrote:
    Such a mask can also be very useful in an adjustment layer to control color, sharpneess, contrast, luminance, etc.
    See/search for PPW, Dan Margulis, Photoshop books on color corrections such as LAB or Photoshop workflow, or Italian site "color duels" or Yahoo group "colortheory".
    This is interesting. I'll check these sources and try some of this today. Thanks Doug.

  • Can you make a gradient mask for photos in Pages 08?

    I have a photo that I want to go from 100% opacity on the left edge to zero opacity toward the right edge.
    Is this possible in Pages 08?
    If so .... is it also possible to control where the "fade out" begins?

    I doubt it is possible inside Pages. It is possible, of course, if you use an external image editor and add the desired transparency there. (Hint: you cannot have a jpg with transparency, but you can with psd, gif, tif or png-24.)

  • How do I Apply a Gradient to an Existing Mask?

    I  have a levels layer created from a selection.  Photoshop  uses a mask to protect/exclude the unselected area on the adjustment layer.  Now I need to add a gradient to that same mask.  But, when I try to add the gradient it throws away the original selection mask.  How can I add the gradient such that affects only the selected area?
    I'm using CS4 on Win7 64bit

    Grouping the layer with a blank layer and applying the mask and gradient worked.  Thanks.
    The other two solutions may well work, but I didn't understand them.  When I tried to use a gradient fill layer it covered the selected area -- that is, it acted as a gradient fill rather than a gradient mask.   Same problem with the gradient overlay, plus I didn't see how to orient the gradient.   Probably my ignorance.

  • Gradient Transparency Mask not working

    Hey there.
    I am working with Flash 8 trying to create a gradient mask
    effect with 2 images and a headline. I have created this effect 2xs
    already for the border of the page. I used 2 movieclips, gave them
    instance names, checked "runtime bitmap caching", and added a
    string of AS: maskee.setMask("mask"); Like I said the first 2 work,
    but I've been trying to add another one for hours and it just won't
    work!?! I even brough all the elements of the 3rd one into a new
    document and it works fine the way I'm doing it!! The file size is
    not enormous. Has anyone else heard of this issue? Any
    solutions!?!?
    Thanks!
    -ms.Lee

    ha! i totally figured it out! you have to have the code (in
    your actions layer of course) on the same frame as the first
    keyframe of the item to be masked. geez, that only took me 3 hours
    to figure out!! well, hope it helps someone else save sometime.
    toodles!
    -ms.Lee

  • Why doesn't masking with gradient layer work when regular gradient does?

    If I make a regular gradient over a layer, and make it's opacity 0, and have it on 'shallow knockout', it will knockout the layer below along the 'lines' of the gradient.
    However, when I make a gradient layer to do the same, and set opacity down to zero, it doesn't seem to work.  Why?

    If I was a more advanced artist, then I might know better when I can merge things and not, but right now, I'm a wanna be artist coming from an engineering background, where when I can't grok a whole picture, I break it down in to parts and combine them.
    Like when then hand didn't look right or I needed fingers to be relocated, I brok apart the hand and fingers so could relocate them
    separately then reshade them after they were in place.
    Another set of things i've kept separate (are about 50-80 'hair strands'  most of which have a unique color, then have a another
    layer for texturing -- painting the texture onto the color made it impossible to change the look of the texture when it was wrong -- and I've changed it several times, because it didn't look right or came up with a better process/way of doing it.  Then there's usually an effect layer on top of that to apply shadowing to the strand, give it a bit of 3-dimensionality, and sometimes multiple or add or something with the layers below for emphasis.
    On change I made -- which helped, I started with all 3 layers in a group.  and 'N' groups... (still have manny like that.. but a new section I started putting base strands in 1, group , then a copy of those layers, blanked and then painted with texture (that's usually brushed on )..., And it seem the only way to apply an effect to one set or the other (or both) is to convert them to smart objects, which still allows editing (but, unfortunately, also stores them in the same file)...
    My eye's, have grown.. ll starting out in a few things, then they got more complex... as I didn't know how to really make an eye look good, so I started w/parts...and ended up with 15 layers/eye (not counting groups... things likke eyebase white, irsibase base, iris color, (base is back to pupil layer somewhere above can punch through to a black layer -- at one point (but backed off that approach, even tried to put some nerves and veins on the iris base...)..... then there's the circles of fibers that make up the iris pattern, various
    tints for various fluids and transparent structures, .. YIEKS...
    Not making any claims about this being a best or even good way, but when you are learning, and especially whern you come from
    an engineering background where you are usd to building thigns up out of parts, .. you don't want to weld your parts together before you are at the final product...and even then, ..... what if you want to make a change?!...
    Again, newbie-problem more than likely...with too much software engineering background...
    Adobe should really have doing part-time work doing product usability/abusability/stability evals... I've pressed it over the limites more than once, and had to redo the way I do things to stay with in its relavtively easy (for me) to hit limits...
    Like the one I posted about the layers slowing things down... trivial to rproduce...yet sounds like Adobe never heard of it.
    Another parallel problem I ran into/noticed the other day -- when I MOVED, 90% of the layers (somehow they got out of alignment with 10% that were still in the origninal... could be related to a move/cancel bug I run into too often as well, which, fortunately, has a not too difficult workaround).  But I moved 90% of those layers, and it only used 2 cpu's out of 6 (and no GPU usage).... took about 45 -60 seconds .. it was a *simple* +/- xy, (no rotations).. so it was something that could have been done in parallel, easily and wouldn't have been compute bound...
    The other bug I've run into WAAY too often, is when trying to move an object, if I don't caefully try to nudge it with rotate, or move a
    side, 1st, but instead, just put my pen in the middle of the object, to try to drag it -- it almost ALL the time, selects some base layer and moves some large percentage of the layers -- in a visually corrupting way... since when you hit escape to break out of the 'free movement)., the parts don't go back to where they belong and stay offset and random places...
    But it's a visual problem only...I think (not sure how my 90% got moved),  -- if you SAVE the file, then make a slight change, and then revert to the just saved copy, it cleans all up.  so it's just the display that's messed up.
    Anyway, slowly over time, all the layers that I originally had a paint or gradient layers surrounded with a vector, I slowly (interspersed with other stuff) converting them to fill/gradient layers which take up comparatively no space.  Really speeds up manipulation of those
    objects as well...
    But it's slowgoing and the interface for creating a gradient to match an existing one is very awkward to use...It's too bad when you
    create a gradient or paint layer to BEGIN with, that it's not automatically created as a vector  Then, when you start to paint on it,
    it creates a layers sized to your painting applied on top of the existing fill layer...would save all the space take by the pixels that were formula driven...   Would be so much more powerful -- only storing as bits the things you need to store as bits, rather than defaulting
    to 'bits' for everything (which really consumes resources!)...
    Personally, Another feature but this might be specialty, or not..... but as I designed my things with parts, it would be nice to be
    able to specify XY coordinate tie points between layers -- so if I moved a layer shaped like a stick, attached to another stick,
    by 1 point at each end, changing the angle of the first would change the angle of the 2nd like a 'joint' -- not like a solid rod.... that
    would be VERY cool!..but not holding my breath on that.
    Just getting the current features to work would be nice...like the gradient masking layer... no reason that shouldn't work, but there ya go. 
    Maybe you know this one (unrelated...)... But I've more than once run out of temporary space (even with usually 130-150GB on my temp store.  The thing is, is that adoe doesn't use any of the extra 56GB I have in my Pagefile -- I can't tell it to use more than 100%
    of physical memory -- (i.e. so it would use part of the page file).  I have 48GB mem, and 56GB pagefile, that's on an SSD., I'd
    rather have it page to the SSD before writing temp files to disk...
    If it could force pages out, to the pagefile, before resorting to a spill file, would save on space and possible speed depending on
    the config...  But , eh, C'est la vie.
    Meanwhile, I's still ike to figure out how to solve the orignal problem, but I'm beginning to think it looks like a core bug...so it maybe hard to get around.
    Thanks for your comments!  As usually, appreciated!...

  • 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).

Maybe you are looking for