2 Replies Latest reply on Jan 24, 2008 1:58 AM by trezbo

    mx.transitions....multiple

    trezbo
      hi can anyone tell me why this does not work with the mx.transitions?

      import mx.transitions.Tween;
      import mx.transitions.easing.*;

      var imgNum:Number=4;
      var num:Number=0;
      var imgArray:Array = new Array();

      for (i = 0; i <= imgNum; i++)
      {
      imgArray = ["img_" + i + "_mc"];
      }

      fadeImg = function(target_mc)
      {
      new Tween(target_mc, "_alpha", Strong.easeIn, 100, 0, 2, true);
      clearInterval(cursorInterval)
      }

      function doFadeImg()
      {
      ++num;
      fadeImg(imgArray
      );
      }
      cursorInterval = setInterval(doFadeImg, 2000);
        • 1. Re: mx.transitions....multiple
          niki tsanov Level 1
          So i made some changes.The first one your clearInterval into the fadeImage i cant understand why is there because after the first fade image you clear the interval.The other thing they i add is the Path variable that mean the movieclip where is stored all image movieclips.Because when you call to fade the image you must have the currect path to the faded image.Afcource if your elements into array starts from 0 you must define num=-1.Also when you call doFadeImg i add IF statement that check if the number of the current items is into the array else clearInterval so with two words just insert the code and try it :)



          • 2. Re: mx.transitions....multiple
            trezbo Level 1
            sorry yeah i left the clearInterval in there from testing to try get the first one working. BUt yes that works perfectly thanks!:)