1 Reply Latest reply on Nov 29, 2006 1:14 PM by kglad

    Help with switching out images

      Hi there :)

      Still an ActionScript Newbie, and am trying to figure out how to correctly code something like this.

      Now, I've done a little bit of training, and the solution is swimming in my mind... but I think I just need a little bit of help shaping this.

      Here is what I want to do. I am creating a flash piece that has pieces of a face swapping out - basically what I have done is in photoshop, taken headshots of people and cut them in half so there is a top half and a bottom half.

      Basically, I want to mimic this (look at the video that loads on this site):


      I want the image swaps to get faster further into the video, so the timings don't have to completely mimic this, but this is the general idea that I am looking to emulate.

      Now, I have a feeling that this involves using arrays... but my mind is not gripping around the syntax involved. How do I get it so the animations of text happen in conjunction with the pictures swapping out? If anyone can help with this, you will have my eternal gratitude. :)

      If you need any more information, please let me know and I'll provide what I can...
        • 1. Re: Help with switching out images
          kglad Adobe Community Professional & MVP
          you can use setTimeout(f,t) to call a function f() after some time t (in milliseconds). in f(), attach an image (after assigning linkage ids to all your upper and lower half images, say upper1,upper2,... and lower1,lower2...) and attach upper1 and lower1.

          if you use a variable to store the current id number to attach you can then increase this number, decrease t and execute another setTimeout(f,t) etc.