0 Replies Latest reply on Sep 21, 2006 2:03 PM by vicflash

    picture slideshow with delay


      I have a single frame movie that I want to use like a type of slideshow.
      I want the slideshow to run continuously (no start, stop, or pause buttons), but have a few seconds delay b/w each photo.
      I eventually want the pictures to be able to be dynamically loaded into the movie and have a variable number of files in the directory where the pictures are stored. (I want the world, I know... :O) )

      So, right now I have a layer that contains a blank movie clip ("imageLoader") that I am loading my pictures into.
      Here is the code I have in the first (and only) frame of my flash movie. This code just simulates if I have 3 pictures in there. I'll try and tackle the dynamic stuff later...
      loadMovie("pics/picture1.jpg", "imageLoader");
      var nTimer:Number = getTimer();
      nTimer = nTimer + 5000;

      while(getTimer() < nTimer) {
      // just wait

      loadMovie("pics/picture2.jpg", "imageLoader");

      nTimer = getTimer() + 5000;

      while(getTimer() < nTimer) {
      // just wait

      loadMovie("pics/picture3.jpg", "imageLoader");

      The problem is that when I run this, it basically waits the full amount of time (of all the getTimer calculations), and then finally loads the last picture.

      Can someone help please?