6 Replies Latest reply on Oct 19, 2006 2:59 AM by ricky1980

    flash slide show problem

    ricky1980
      Dear All,

      I have the attached code , i want to move 5 photos form right to left. But it does not work. What is the correct way to write this action script if i want to load the photo dynamically.


      Regards,

      Ricky
        • 1. flash slide show problem
          DazFaz Level 1
          Ive just take a very quick look over this and changed a few things, but it works now. I hope it helps you.
          //------------------------------------------------------
          var spacer:Number = 50;
          for (var i = 1; i<5; i++) {
          this.createEmptyMovieClip("mc"+i, i);
          this["mc"+i]._x = spacer;
          this["mc"+i]._y = 50;
          this["mc"+i]._alpha = 100;
          this["mc"+i].createEmptyMovieClip("image", this.getNextHighestDepth());
          this["mc"+i].image.loadMovie(i+".jpg");
          this["mc"+i].onEnterFrame = function() {
          if (this._x<700) {
          this._x = this._x+5;
          } else {
          this._x = 0;
          }
          };
          spacer = spacer+150+30;
          }
          //------------------------------------------------------
          • 2. Re: flash slide show problem
            ricky1980 Level 1
            Dear DazFaz ,

            DO you know the code that can stop the photo sliding , if the mouse is over a photo.



            Regards,

            Ricky
            • 3. Re: flash slide show problem
              DazFaz Level 1
              Hi Ricky,

              Sure and here it is:
              • 4. Re: flash slide show problem
                ricky1980 Level 1
                Dear DazFaz ,

                Thx you very much for your help. Could you help me to see what is the problem. It can not load the photo.
                I have trace the result , it can output the correct photo names 1.jpg, 2.jpg and 3.jpg in the for loop. But the
                photos can not load to the swf.


                Regards,


                Ricky
                • 5. Re: flash slide show problem
                  DazFaz Level 1
                  Hi Ricky,

                  The reason why its not loading the images is because of:
                  this["mc"+i].image.loadMovie(this );
                  I will assume you know what is going on with "this
                  " and that an array of your slide names are being returned from the .php and so what you might need to do is change this to eval(this); Baring in mind that the Object array is parsing correctly then this should work for you.
                  • 6. Re: flash slide show problem
                    ricky1980 Level 1
                    Dear DazFaz,

                    i have the attachemnt code error, nothing happen , Do you know why , thx for your help.


                    Ricky