Siu Lun

Flash CS3 z-index, display index, etc…

by Siu Lun on Apr.07, 2008, under Ramblings

If you’re a noob in Flash, looking for z-index in AS3. well, there isn’t one.

There used to be a property called depth. But now it has become an index of the array object.

So for example, you add a dynamic object into Flash MainTimeLine at runtime. your “z-index” is your index within the MainTimeLine’s object array.

To set the index. Use setChildIndex(childObject, i); where childObject is the object in question, i is an integer. This would add the child into that index and move the “original occupant” and everything above that up by 1.


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...