Flash is duplicating my MovieClip instances for some reason. They are a series of three clips that are on the main timeline, with no animation on the main timeline, though there is some inside the clips.
After doing gotoAndStop
backwards on the timeline, the three clips, pic1
, pic2
, and pic3
, become duplicated. Well, actually, it seems to create a completely new instance of these three clips. After this duplication, the new clips seem to "override" the old ones, since referring to them always refers to the new one, but they are both still present on the stage.
I ran the following test to see what would happen:
for (var i:int = 0; i < this.numChildren; i++) {
trace(i + ": " + this.getChildAt(i).name + ": " + this.getChildAt(i));
}
And I got this baffling output:
0: pic3: [object pic3holder_99]
1: pic2: [object pic2holder_100]
2: pic1: [object Pic1]
3: pictureDesc: [object pictureDesc_98]
4: pic3: [object pic3holder_99]
5: pic2: [object pic2holder_100]
6: pic1: [object Pic1]
7: switchBTN: [object switchButton_101]
8: overBTN: [object MovieClip]
Yes, those are sets of MovieClips with the same instance name. Has anyone ever encountered this before? What on Earth could be going on?
EDIT: I've found that it seems to only occur when I re-order the MovieClips with ActionScript. It seems to think the MCs are out of order, then re-adds them. Is there any workaround to this issue?