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?
for (var i = 0; i <siteCount; i++)
deltaX = i - Math.floor(i/ thumbsPerRow) * thumbsPerRow;
In AS 1 & 2, Flash uses depth as a unique identifier for
objects and their sorting order (this is still true in AS3, but the
handling is rather different).
So if you place an object into depth 1, then another object
into that same depth, Flash assumes you want to replace the first
with the second. By doing this, you can have better control of
items as they pass in front of each other during programmatic