1 Reply Latest reply on Oct 6, 2007 8:19 PM by clbeech

    slideshow positioning

    jaatendi
      hi, i am having trouble positioning my slideshow onto the website im building. there seems to be a problem with the y axis.
      any help would be huge! this is the code:

      this.createEmptyMovieClip("images", 100);
      this.attachMovie("mask", "mask", 101);
      mask._x = images._x =100;
      mask._y = target = 775;
      images._y = 0;
      images.setMask(mask);
      speed = 1;

      for (var i = 0; i<15; i++){
      var image = images.attachMovie ("image"+i, "image"+i, i);
      img._y = img._height*i;
      thumb.onPress = function (){
      target = this.pos;
      };

      thumb.onRollOver = function(){
      this._alpha = 100;
      };

      thumb.onRollOut = function(){
      this._alpha = 60;
      };
      }

      this.onEnterFrame = function (){
      images._y += (target-images._y)/speed;
      };

      this.createEmptyMovieClip ("images", 100);
      this.attachMovie ("mask", "mask", 101);
      mask._x = images._x = 225;
      mask._y = images._y = 25;

      images.setMask (mask);
      images._y = 225;
      speed = 1;

      for (var i = 0; i<15; i++) {
      var img = images.attachMovie ("image"+i, "image"+i, i);
      img._y = img._height*i;
      var thumb = this["thumb"+i];
      thumb._alpha = 60;
      thumb.pos = target=(i*-img._height);
      thumb.onPress = function(){
      target = this.pos;
      };
      thumb.onRollOver = function() {
      this._alpha = 100;
      };

      thumb.onRollOut = function() {
      this._alpha = 60;
      };
      }
      this.onEnterFrame = function (){
      images._y += (target-images._y)/speed;
      };



      stop ();













        • 1. Re: slideshow positioning
          clbeech Level 3
          this code is very confused, it looks like you're doing things twice and trying to add different variables and properties in different places. you've declared 'images' and 'mask' MCs twice at the same depth but move to different postions, which will only replace the first instances. there are two onEnterFrame event operating on the same instance name, in the first for loop you're setting the value of 'img' MC which hasn't been declared there, and assigning handlers to 'thumb' which also hasn't been constructed there.

          I'm sorry there's a great many things wrong here, they may be typos though. It looks like you trying to create two scrolling columns of thumbnails from the Library.