3 Replies Latest reply on Jul 30, 2010 10:33 AM by Ned Murphy

    Fade in from left to right


      Hi I am trying to fade in a symbol (movie clip or graphic) from left to right  (have the actual image start fading in from one edge to another - not the actual image moving).  This symbol was originally a drawing object which was imported and then converted to a symbol.  I tried by settng a frame with alpha set at 0 and 30 frames later setting alpha at 100, and then in between these frames creating a linear gradient.  However, the graphic is actually 5 pictures put together - Imagine " M E T R O " as pictures put together.  But when I do the linear gradient it will it on the " M " and then also a separate linear gradient on the " E " and so on....it will not do 1 linear gradient so as to start out dark on " M " and end up white on "O", it will do do a linear gradient for EACH letter.  I tried grouping, ungrouping, setting layers, highlighting different parts, etc.  but to no avail.  Does anyone know a good method to do such a 'fade in' from 'left to right'?  If not by linear gradient maybe through a gradient mask ?

        • 1. Re: Fade in from left to right
          Ned Murphy Adobe Community Professional & MVP

          I can't be sure this is what you are after, but if you create a gradient movieclip (msk) with the intention to use it as a mask (it needs sufficient non-gradient area to cover the whole image when its done), and havethe image as a movieclip (mc), and use some tweening approach to gradually move the mask over the image, then the following AS3 code would cover making the mask cause the image to gradually appear from one end to the other...


          msk.cacheAsBitmap = true;
          mc.cacheAsBitmap = true;
          mc.mask = msk;


          Edit: The gradient end of the mask needs to go from full color to alpha = 0

          • 2. Re: Fade in from left to right
            chomebole Level 1

            Will this work if I do not have a solid background though?

            • 3. Re: Fade in from left to right
              Ned Murphy Adobe Community Professional & MVP

              I'm not sure what you mean, but it won't take long for you to try it and find out.  A mask simply shows what's under it, so if what's under it has no background it won't matter.

              1 person found this helpful