actionscript 3 - as3-manipulating z-index dynamically -


so have trouble z-index, of objects have z-index of 0, , new objects created come above ones need in front. know setting z index commands, if have 50 objects, have write , manually set z-index each one, witch kinda lame. how can fix this? simple im new as3.

if z-index mean z value of displayobject, doesn't affect layering of them. depth ordering handled display list of parent.

you can make displayobject go way using container.addchildat(displayobject, 0); or container.setchildindex(displayobject,0); if it's added parent's display list. don't have change indexes of other children of same parent.

if want layered right behind displayobject, first find out index of child is:

var i:uint = container.getchildindex(theonetohidebehind); 

and set index of displayobject value:

container.setchildindex(mydisplayobject, i); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -