Then I create a placeholder movie clip in the order I intend for it to go, then put the new movie clips in that clip later. The parent clip holds the depth, so no matter how many child clips I create, they are always ordered relative to the rest of the content as intended. I always group related content into its own movie clip to simplify moving/animating/hiding the content anyways. I rarely come across scenarios where a combination of movie clip organization and getNextHighestElement do not work as intended.

Nathan
http://www.nathanderksen.com


On Feb 5, 2006, at 1:33 AM, ryanm wrote:

and you want to add something between the content and the footer, then just add it in between:

buildHeader();
buildContent();
buildMoreContent();
buildFooter();

Guess where the new stuff ends up? No figuring out what depth to assign, no re-assigning depths, no collisions. Nice and simple.

What if it's not supposed to be built at the same time as the other elements? There are thousands of what ifs that might make your example not work. All of this becomes moot with the AS3 DisplayList, but as long as you have to work with the current depth system, it is a good idea to keep track of where you are putting stuff, rather than depending on execution order to place them in the right depths.

ryanm
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to