Can't stop making
Home
07th April, 2008
Monday

Flash CS3 z-index, display index, etc...

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

Leave a comment

Any published comments will adhere to the etiquette policy and all e-mail addresses will be treated in accordance to the privacy policy.

  • If you see this, something's wrong with Twitter.

Blatant Plug

Need a new CPU or graphics card? Get AMD.

AMD Vision and AMD Radeon Graphics

Support

I've pledged my support to these organisations, and I think you should too.

  • Google+
  • Follow ronaldslc on Twitter
  • View Ronald Chan's profile on LinkedIn