# Removing duplicated movieclips

**URL:** https://forum.kirupa.com/t/removing-duplicated-movieclips/2799
**Category:** Uncategorized
**Created:** [April 8, 2002, 5:47pm UTC](https://forum.kirupa.com/t/removing-duplicated-movieclips/2799 "2002-04-08T17:47:56Z")
**Posts on this page:** 2
**Page:** 1

<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: [April 8, 2002, 5:47pm UTC](https://forum.kirupa.com/t/removing-duplicated-movieclips/2799/1 "2002-04-08T17:47:56Z")

</div>

Hi everyone,\r\rI was wondering if anyone could tell how I could go about removing or deleting movie clips that have been created with a for loop. Here is my code that I have attached to a movieclip on the main stage. \ronClipEvent (enterFrame) {\r for (i=1; i\<=10; i++) {\r duplicateMovieClip("\_root.moveline", “\_root.newline” + i, i);\r \_root.moveline.\_y = random((100) + 50);\r }\r}\rand I want to remove these duplicated mc’s. I added this code to frame 10 of my movie, \r\_root[“newline” +i].removeMovieClip();\rbut it didn’t work, the reason I think its not working is because of the enterFrame part of the onClipEvent if anyone could help me figure out whats going wrong it would be great.\r\rThanks Alot\r\rKyle

---

<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: [April 8, 2002, 5:59pm UTC](https://forum.kirupa.com/t/removing-duplicated-movieclips/2799/2 "2002-04-08T17:59:47Z")

</div>

I’m not sure, Kyle, but this may be a problem of level.\rWhen you write \_root[“newline” +i].removeMovieClip();, \_root. refers to the \_root. of level0. But the clips are loaded in level1, level2…\r\rpom 0]
