6 Replies Latest reply on Apr 17, 2007 12:45 PM by gregoryrwalker

    Dynamic slideshow actionscript

    gregoryrwalker
      Okay. I'm working on a slide show in Flash 8, and what I've been trying to do is create a couple of functions to dynamically load a jpeg based on a variable that gets updated by the function (for example, file 1001, file 1002, etc). I wanted to keep the number of movie clips down to two and use FuseKit to fade one in and then the other out. So what I was envisioning went something like this.

      mc1._alpha : 0;
      mc1.loadMoive("assets/"slideNubmer".jpg");
      mc1.alphaTo (100, 3);
      slide++;

      Now, further down the timeline something like this

      mc2._alpha : 0;
      mc2.loadMoive("assets/"slideNubmer".jpg");
      mc1.alphaTo(0, 3);
      mc2.alphaTo(100, 3);

      The problem I'm running into is that the jpegs take time to load and that I can't tween the moviecliip until the whole image is loaded. I'm sure there's some sort of event handler logic that can be implemented to accomplish this, but I can't figure it out. The reason I'm going to all this trouble is that I'd like to get the slide show set up so that I can change the order of the slides just by changing their file name.

      Also, I'm not the most gifted coder, so if anybody has a better way to go about doing this, I'd be glad to hear it.

      --gw