3 Replies Latest reply on Jan 8, 2010 12:04 PM by kglad

    fading slideshow

    TeamCIT

      Forgetting about my last post: This code currently makes it so each picture will fade from white. What I'm trying to do is make the slideshow so that each picture transitions into each other, instead of from white. Help is much appreciated!

       

      p = 0;
      this.onEnterFrame = function() {
          filesize = picture.getBytesTotal();
          loaded = picture.getBytesLoaded();
          if (picture._alpha<100) {
                  picture._alpha += 10;
              }
      };

       

      //the first image
      function firstImage() {
          if (loaded == filesize) {
              picture._alpha = 0;
              picture.loadMovie(image[0],1);
              slideshow();
          }
      }

       

      //goes to the next image
      function nextImage() {
              p++;
              if (loaded == filesize) {
                  picture._alpha = 0;
                  picture.loadMovie(image[p], 1);
                  slideshow();
              }
      }

       


      //makes the slideshow change slides
      function slideshow()
      {
          function pause_slideshow()
          {
              clearInterval(myInterval);
              if (p == total - 1)
              {
                  p = 0;
                  firstImage();
              }
              else
              {
                  nextImage();
              }
          }
          myInterval = setInterval(pause_slideshow, 4000);
      }