# Removing MCs attached to other MCs

**URL:** <https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120>\
**Category:** flash\
**Created:** [October 2, 2004, 9:05pm UTC](https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120 "2004-10-02T21:05:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boondogger](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Boondogger](https://forum.kirupa.com/u/Boondogger)\
**Post date:** [October 2, 2004, 9:05pm UTC](https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120/1 "2004-10-02T21:05:01Z")

</div>

In the code I am working on I am attaching MCs to other MCs. However, when I remove the second MC the first one gets removed too. HexStore contains a load of game hex MCs. LastLocation is the last hex MC clicked. myBrigade is the extra MC that needs to be removed from the LastLocation MC. Here is the code:

\_root.HexStore[\_root.LastLocation].removeMovieClip(\_root.HexStore[\_root.LastLocation][“myBrigade”]);

Any idea where I’m going wrong with this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2004, 2:50am UTC](https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120/2 "2004-10-03T02:50:48Z")

</div>

```auto
_root.HexStore[_root.LastLocation]

```

takes you right where you want to be, then you added

```auto
.removeMovieClip(_root.HexStore[_root.LastLocation]["myBrigade"]);

```

try this:

```auto
_root.HexStore[_root.LastLocation].removeMovieClip("myBrigade");

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2004, 4:15pm UTC](https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120/3 "2004-10-03T16:15:08Z")

</div>

Sorry Smee, that didn’t work either. The original MC still got removed. Any other ideas?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 4, 2004, 4:59pm UTC](https://forum.kirupa.com/t/removing-mcs-attached-to-other-mcs/66120/4 "2004-10-04T16:59:19Z")

</div>

so, i am supposing that [\_root.LastLocation] is a variable on \_root?
