question about depth of a movieclip


hi,

i using code below, borrowed, display thumbnails on stage. don't understand why "depth" of movieclip "thumb" has increased, when different instances of movieclip being created , displayed on different x,y coordinates on stage.
i replaced zindex constant 1, when test movie, first thumbnail appears , dissapears when second thumbnail appears.

can explain why depth needs different different instances of "thumb" movieclip?

thanks

code:
for (var = 0; <sitecount; i++)
{
deltax = - 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);
}

in 1 & 2, flash uses depth unique identifier objects , sorting order (this still true in as3, handling rather different).

so if place object depth 1, object same depth, flash assumes want replace first second. doing this, can have better control of items pass in front of each other during programmatic animation.


More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums