0
votes

I am working on a Flash ad. I use AS3 generated objects as well as movieclips placed manually in the timeline. Although the AS3 layer is below my manually placed timeline layers, the AS3 placed movieclips are visible "above/on top of/have higher z-index than" my timeline layers.

I am aware of handling the display order of AS3 generated objects via display list model, like discussed here.

However I cannot find information in which way timeline layers(Flash IDE layers) are correlated to AS3 generated "display object containers". Edit: Obviously IDE layers are out of scope of the display list model, but I have no source for that.

Basically I only want to make sure that my transparent clickTag-button-layer is above all content in my ad. Currently the AS3 placed movieClips are above it.

1
Provide the code you are using add and manipulate the depth of these MovieClips. Without that we can only speculate as to what could be your issue. With that said, you want consider manually placing an empty MovieClip in your timeline, below the other objects, and adding your AS3 generated objects into it. - C. Parcell
You may also want to loop over the children on your Stage and see what order they are in. stage.getChildIndex() You will be surprised by the difference by index of timeline objects verse the ones placed by AS code. - C. Parcell
Thank you, I will try that empty MovieClip approach. I have not added any code, as currently I am not changing the "ordering" of the AS3 generated objects at all. I tried the container approach from the display list model, but that did not solve my issue. - AndyZ
@C.Parcell Thank you, this solved my problem. I placed an empty MovieClip where I place the AS3 generated content. Also just now I found the info, that Flash IDE layers are not part of the AS3 display list model, so they cannot be managed from AS3. - AndyZ
It's a question of timing. I do assume that you use multiple frames and in that case the content is always generated again and again as you move through the frames meaning it gets on top of everything. It's a question of timing because all content generated by code should be added on top AFTER the timeline content appears. If it appears under it's because that code run before that timeline content gets added. - BotMaster

1 Answers

0
votes

I do not know if I understand your question, but you can use setChildIndex to set elements depths, take a look here for more information : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayObjectContainer.html#setChildIndex().