Is there any method with which I can get to know which of the two movieclips I’m using is lying above or below in the timeline ‘layer’ arrangement in flash.
what I’m asking is if have two movieclips ‘a’ and ‘b’. One in layer 10 of timeline of flash professional and ‘b’ on layer 1. Will be able to change the index order using pure as3 code to visually keep the movieclip on the 10th layer on top of the movieclip on 1st layer??
Thank you.
Vishnu
[[Edit]]
The attached method will not work if both target objects are leaf nodes in a shared parent.
The timeline children are always under whatever actionscript generated children are associated to the timeline class.
e.g.
If you have timeline X, which extends ClassA, and in Class A, you add children E, F, G, but timeline X contains layers B, C, D, each with a single symbol in each layer, with layer B at the bottom of the timeline, the following would be observed:
To expand on a felipemaia’s answer, I’ve devised the following method to determine which movie clip lies absolutely above the other. This has not been thoroughly tested, but should operate as a baseline for your development.
This method will work for nested display hierarchies. I have not tested this 100%, but initial cases completed as expected.
Best of luck!