3 Replies Latest reply on Oct 30, 2009 9:27 AM by MNSTRsquad

    Help making second image of slideshow load a button.

    MNSTRsquad

      Hi everybody.

       

      Can someone help me with the actionscript to make one of my images in a slideshow (which the images are linked externally through actionscript)

      load a button that is only accessible when that specific image is shown.

       

      for example-image 1- no button but image 2 has the button, image 3-no button, image 4 no button.... and so on.

       

      heres my script for the slideshow and prev and next buttons

       

      var totalSlides:Number = 6;
      var currentImage:Number = 0;
      var imagePath:String = "images/ad";
      var imageName:String = "ad";
      var imageExt:String = ".jpg";

       

      var adImages:MovieClipLoader = new MovieClipLoader();

       

      function loadSlide(){
          adImages.loadClip(imagePath + currentImage + imageExt, "adImages_mc");
      }

       

      loadSlide();

       

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

       

       

      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;
          }
      }

       

       


      Im a beginner but know some actionscript.

      I really appreciate the help.

      Thanx