1 Reply Latest reply on Jul 16, 2008 6:07 AM by Graphic Graeme

    actionscript slideshow

    Graphic Graeme Level 1
      I have been doing a AS tutorial online and am wondering how to add some interest to this otherwise boring slideshow
      here's the code i have so far:
      var totalSlides:Number = 5;
      var currentImage:Number = 0;
      var imagePath:String = "images/sunset_";
      var imageName:String = "1 of ";
      var imageExt:String = ".jpg";

      var myMCL:MovieClipLoader = new MovieClipLoader();
      var myListener:Object = new Object();

      this.slideName_txt.autoSize = "center";


      function loadSlide() {
      myMCL.loadClip(imagePath + currentImage + imageExt, "container_mc");
      _root.slideName_txt.text = (imageName + (currentImage + 1));
      }

      loadSlide();


      this.prevSlide_btn.enabled = false;
      this.prevSlide_btn._alpha = 50;

      this.nextSlide_btn.onRelease = function() {

      _root.prevSlide_btn.enabled = true;
      _root.prevSlide_btn._alpha = 100;


      if (currentImage < (totalSlides - 1)) {
      currentImage ++;
      loadSlide();
      }


      if (currentImage == (totalSlides - 1)) {
      _root.nextSlide_btn.enabled = false;
      _root.nextSlide_btn._alpha = 50;
      }
      }


      this.prevSlide_btn.onRelease = function() {

      _root.nextSlide_btn.enabled = true;
      _root.nextSlide_btn._alpha = 100;


      if (currentImage > 0) {
      currentImage --;
      loadSlide();
      }


      if (currentImage == 0) {
      _root.prevSlide_btn.enabled = false;
      _root.prevSlide_btn._alpha = 50;
      }
      }