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);
}
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.
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
Post a Comment