# Ending the For Loops

**URL:** <https://forum.kirupa.com/t/ending-the-for-loops/111986>\
**Category:** Uncategorized\
**Created:** [June 2, 2004, 10:16am UTC](https://forum.kirupa.com/t/ending-the-for-loops/111986 "2004-06-02T10:16:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashermx](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@flashermx](https://forum.kirupa.com/u/flashermx)\
**Post date:** [June 2, 2004, 10:16am UTC](https://forum.kirupa.com/t/ending-the-for-loops/111986/1 "2004-06-02T10:16:58Z")

</div>

We have a For Loop that duplicates and movie Clip.

for (counter=2;counter\<=15;counter++) {  
duplicateMovieClip(enemy,“enemy”+counter,counter+100);

}

On a hit test we want to remove all the duplicated movieclips. I acomplished this using a new scene with a frame action contianing another For Loop and a remove movie clip action. Hit test true move to new scene play frame action.

for (counter=2;counter\<=15;counter++) {  
removeMovieClip(“enemy”+counter);

}

This worked.

Is there a way to put a stop of the For Loop or Put a stop on the Duplicate movie clip?  
:hair:
