4 Replies Latest reply on Apr 4, 2007 4:16 PM by crazyjoemilan

    really sliding slide show

    Steve Zeeeee Level 1
      Can anyone tell me how this is done, or send me to a tutorial? I would like to use one long horizontal picture where only 800 pixels shows. When the user presses advance, the picture slides to the left 800 (1000?, my choice) pixels to reveal the next segment, and so on. Ease the start and end of each movement. So this is literally a "slide" show. And have a "previous" option to do the same thing backwards.

      Flash 7 Mac OSX
        • 1. Re: really sliding slide show
          crazyjoemilan Level 2
          http://www.kirupa.com/developer/actionscript/tween.htm

          I've linked this twice today, but it really is a very nice tutorial on ActionScripting motion without hand coding everything....

          Ahhh flash 7.

          Okay, you'll have to hand code it using either a timeline loop, or setInterval.

          function moveToRight() {
          movieClipName._x += 5
          }

          function goToNext() {
          setInterval(moveToRight, 5);
          }

          Calling goToNext will send your mc off to the right, but it won't ease, and it won't stop.

          function moveToRight() {
          movieClipName._x += 5
          if (movieClipName >= 800) {
          clearInterval(myInt);
          }
          }

          function goToNext() {
          myInt = setInterval(moveToRight, 5);
          }

          now it will stop. All you'll need now is to match a curve with our += 5 (you can do this with % of distance as well... try it on your own and see if you can get it to work.
          • 2. Re: really sliding slide show
            Steve Zeeeee Level 1
            So these scripts would be attached to the button, correct?
            and x +=5 has an important space in there?
            and "5" represents what?
            (myint): am I supposed to replace the contents with anything or is that how to use it?
            What does "match a curve" mean? Does flash 7 have this capability?
            And how do I make "previous" button do just the opposite?
            Thanks so much for helping. I am running out of time to start something new like this on the current project, but I will try it very soon regardless.
            • 3. Re: really sliding slide show
              crazyjoemilan Level 2
              and x +=5 has an important space in there? x = x + 5
              and "5" represents what? it will move right 5 pixels each time the function is called.
              (myint): am I supposed to replace the contents with anything or is that how to use it? myint is just a variable name for the setInterval function which calls the function named (in this case moveToRight) every 5 milliseconds.

              And how do I make "previous" button do just the opposite? x -= 5 is left.
              • 4. Re: really sliding slide show
                crazyjoemilan Level 2
                oh, and to match a curve is to match the distance the object travels with the distance from the stop and start points. this is doable in math, and so you can do it with flash.