# Two MovieClip instances with the same name..?

**URL:** <https://forum.kirupa.com/t/two-movieclip-instances-with-the-same-name/296234>\
**Category:** Uncategorized\
**Created:** [September 11, 2009, 9:37am UTC](https://forum.kirupa.com/t/two-movieclip-instances-with-the-same-name/296234 "2009-09-11T09:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![missileh](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@missileh](https://forum.kirupa.com/u/missileh)\
**Post date:** [September 11, 2009, 9:37am UTC](https://forum.kirupa.com/t/two-movieclip-instances-with-the-same-name/296234/1 "2009-09-11T09:37:55Z")

</div>

Hi All,  
The zipped attachment for this post, contains two files trial.fla and img.jpg.  
In the flash movie, I have done the following:  
Created three frames with stop() on all the three.  
“Prev Frame” & “Next Frame” buttons allow us to move to all the three frames.  
There is a movieclip instance with the name: “abc” common to all the three frames.  
The button “Show/Hide Abc” makes “abc” visible & invisible.  
In the second frame, I am loading the external image “img.jpg” and setting the child index of “abc” to numChildren - 1.  
Now if I move to frame 3 and try to hide “abc” (using “Show/Hide Abc”), it works fine. But once I switch back to frame 2 or subsequently to frame 1, I can see two instances named “abc” in the trace window. (I display all the children of the displayList on every frame). \*\*Why do two instances named “abc” appear?  
\*\* Due to two instances of “abc”, the button to hide “abc” no longer works.  
Can you help me fix this? Its very important.  
NOTE: If I do not change the childIndex of “abc” to numChildren - 1 then everything works fine. But I have to do this in my project where a similar problem has crept up.
