5 Replies Latest reply on Jan 18, 2007 12:17 PM by kglad

    mc transition

    jagguy99
      Hi,

      I want to load an image from a file into a MC to replace the current image. I want a smooth transition effect replacing of images , but the image swap isn't as it stil looks to quick.


      var olist2:Object=new Object;
      olist2.onLoadInit=function(mm:MovieClip):Void{
      mm._width=130;
      mm._height=130;
      mm._alpha=50;
      var nfade2:Number=setInterval(fadeIn,50,mm);;
      };


      function fadeIn(mm:MovieClip):Void {
      if(mm._alpha <100)
      {
      mm._alpha++;
      }
      else
      {
      clearInterval(nfade2);
      }

      }
      ...
      mLoad2.loadClip(aval[this.incr2],my)
        • 1. Re: mc transition
          kglad Adobe Community Professional & MVP
          you've shown code that fades a loaded movieclip from an _alpha of 50 to 100 and there's no problem with that code.

          what is it that you're asking?
          • 2. Re: mc transition
            jagguy99 Level 1
            I want the image to have a slower transition from 1 image to the other. With a click it changes at an instant. I see this alot with images with flash actually.
            • 3. Re: mc transition
              kglad Adobe Community Professional & MVP
              you can slow your interval loop, you can decrease the _alpha's increment and you can start from a number less than 50. and you can do any combination of the 3 to slow that part of the transition.

              i would assume you're doing something similar with the previously loaded image that's fading-out. or is that the problem? you're not fading-out the previously loaded image?
              • 4. Re: mc transition
                jagguy99 Level 1
                I can fade in an image but not fade ou the old image and then fade in a new image
                • 5. Re: mc transition
                  kglad Adobe Community Professional & MVP
                  if you want to use simultaneous fades (the current fading out while the next is fading in) you'll need to use, at least, 2 target movieclips into which to load your current and next images.

                  then when your onLoadInit() executes, you can begin to fade the current and next.