2 Replies Latest reply on May 7, 2007 6:55 PM by Rothrock

    question about depth of a movieclip

    mmesarina
      Hi,

      I am using the code below, which I borrowed, to display thumbnails on the Stage. What I don't understand is why the "depth" of the movieclip "thumb" has to be increased, when different instances of that movieclip are being created and displayed on different x,y coordinates on the stage.
      I replaced the Zindex with the constant 1, but when I test the movie, the first thumbnail appears and then dissapears when the second thumbnail appears.

      Can someone explain why the depth needs to be different for different instances of the "thumb" movieclip?

      thanks

      Code:
      for (var i = 0; i <siteCount; i++)
      {
      deltaX = i - Math.floor(i/ thumbsPerRow) * thumbsPerRow;

      thumb = attachMovie("thumb", "thumb" + i, zIndex++, {_x: deltaX * (thumb._width + xSpacing ) + thumbXBegin, _y: Math.floor(i/ thumbsPerRow) * (thumb._height + ySpacing) + thumbYBegin});

      thumb.setData(i, sites );


      thumbArray.push(thumb);
      }