Skip to main content
socalfish-fDJTBM
Inspiring
July 24, 2009
Question

Setting the Z Order or setChildIndex

  • July 24, 2009
  • 1 reply
  • 600 views

Hopefully I will be able to explain this correctly. On my Root Timeline I have a MovieClip (1) the has a border on top and bottom, both have shadowing added to them. On another layer below this one I have another MovieClip (2) with a full screen background. This causes anything I put in MovieClip (2) to appear underneath MovieClip (1).

Problem: I have an item on screen that can not be moved to avoid the MovieClip (1) over it. So I found setChildIndex. When I use it on MovieClip (2) on the root timeline all works great and I can click on my item. But there is a Chapter Menu I unfold and now it is under MovieClip (2) and it should be on top of MovieClip (2). All I really want to do is make the item in MovieClip (2) be on top of everything. This would only apply to one item on screen and not others.

Does this make sense?

This topic has been closed for replies.

1 reply

robdillon
Participating Frequently
July 24, 2009

From your description it sounds like all of these objects are placed on the stage and are using the timeline. If this is the case, then the original z order for these objects will follow the ordering of the layers in the timeline. You have changed the z order by using setChildIndex() to move one object to the top of the z order. What you probably should have done was to move the object that was on top to the bottom of the z order.