0 Replies Latest reply on Aug 12, 2007 3:22 PM by mptado

    Flash 8: Overlapping Pictures

    mptado
      Hello all. I am attempting to create a series of overlapping pictures through the means of ActionScript. My goal is to overlap 12 pictures sequentially to get the effect of a flowing stream. The stream images are titled "stream#.jpg." So far, here is what I have:

      - Frame 1 sets up 4 variables:

      var prev:Number = 0;
      var curr:Number = 1;
      var nextPic:Number = 2;
      var mcLoader:MovieClipLoader = new MovieClipLoader();

      - Frame 2 includes a blank MC that tweens over 7 frames. The alpha goes from 100 to 0, and the instance name is "container_mc." I also have another blank MC underneath it called "bg_mc," which is supposed to include the next image in the sequences (i.e. Image 1 would fade and Image 2 would be directly underneath it). Here is the code I have:

      mcLoader.loadClip("images/stream"+curr+".jpg", container_mc);
      mcLoader.loadClip("images/stream"+nextPic+".jpg", bg_mc);

      prev = curr;
      curr = nextPic;

      if (curr == 12) {
      nextPic = 1;
      } else {
      nextPic++;
      }

      As you can see, I have a MovieClipLoader load each picture to their respective blank MC. The tween lasts for 7 frames, and at the end I have the movie clip go back to Frame 2. Here is the problem I am having: Flash is loading each picture in perfectly, but at the beginning of each loop the two blank MC's do not load the images right away (background flashes). I have uploaded my swf file, so to see what I'm talking about visit http://mpfurtado.250free.com/tidalyarn/header.html