Same problem from 2008 still exists: http://www.kirupa.com/forum/showthread.php?285768-movieClip-stops-twee ning-after-setChildIndex.
Also described here: http://www.actionscript.org/forums/showthread.php3?t=258181 "Flash usualy does remove the instances even after you have controlled their position. But messing with their childIndex greatly confuses the player and makes it lose track of the instances."
And encountered again here: http://board.flashkit.com/board/showthread.php?818335-setChildIndex-ki lls-frame-animation, and the last post (i.e. the end result of the situation) was the person saying "This is why I don't use timeline's anymore." ... which leads me to my point.
In educational software, I have lessons set up where each frame is one page with content. Some pages are interactive. When the playhead moves to a different frame with different content, flash normally removes the content from the previous frame and loads the content for the new frame. That's basic keyframe functionality, and is kind of the whole point of using keyframe animation software... when you insert a blank keyframe, you expect the content from the previous keyframe to be removed.
Well, I'm finding that calling setChildIndex on a clip destroys the keyframe behavior for that clip. For example, I have some drag/drop functionality, and when moving on to the next page/frame, items that should not be there are persisting onto the next frame. This occurs when an item is dragged and setChildIndex is called to move it to the foreground.
Once setChildIndex is called, the object seems to lose its keyframe information, because it is not removed on the next page; it remains. If you then return to the previous page, a 2nd copy of the object is constructed, while the first copy is still visible.
That's the kind of behavior I would expect for a dynamically added child (persisting across keyframes), but not the behavior I would expect from an object that was defined on the stage in the designer. Years ago, when Macromedia owned Flash, that clear distintion existed (designer objects were at negative depths and could not be removed unless swapped into a positive depth, which made sense). Now, it seems that there is no such distinction, and changing the child index of any object for any reason seams to rip it out of the keyframing system.
Is this behavior described anywhere in the documentation... specifically that calling setChildIndex on an object causes it to lose all keyframe information?