1 person found this helpful
there's a known flash bug when using the timeline and changing an object's depth.
I wonder if it's really a bug or if it's a design issue. Seems like a design issue to me -- something not easily fixed without a major reworking of the timeline code.
Here's someone's post on stackoverflow with the exact problem and even the same scenario that I'm encoutering: http://stackoverflow.com/q/6822416/88409
"The problem is that when I move to a different key frame on the timeline using gotoAndStop, the symbols that were touched by AS3 in the previous frame, even if they are not referenced by the designer's key frame, show up on the stage. It is as though any DisplayObject that I touch with AS3 becomes divorced from the timeline.
It definitetly is triggered by operating on the child's depth directly, because changing it's depth indirectly doesn't cause the issue. For example, if your timeline starts out with 2 objects, you can insert new objects via ActionScript at depths 0, 2, and 4, causing both original object's depth to change, but the problem doesn't occur and keyframing for those objects remains intact. If you move the the next frame, which is blank, the keyframed objects are removed as expected, and when you go back to the first frame, the keyframe objects are recreated as expected (on top of the dynamically created objects).
So it almost seems like something in setChildIndex is expliticly deactivating the keyframing, because a depth change alone isn't causing the issue.
Problem also seen here: http://www.actionscript.org/forums/showthread.php3?t=262797
And seen here where someone is trying to do a 3D rotating ring of clips using the timeline and setChildIndex: http://board.flashkit.com/board/showthread.php?775200-Z-Order-setChildIndex-problem
This problem, on a scale of 1 to 10, is an 11.... rendering the products advertised features useless, because it creates a complete incompatibility with using keyframes and ActionScript. It's also, unfortunetly, something that can't be fixed, because it would cause breaking changes to backward compatible behavior. User comments like "This is why I don't use timeline's anymore." are evidence of this.