# How to create movieclips using a loop, and then start drag and drop?

**URL:** <https://forum.kirupa.com/t/how-to-create-movieclips-using-a-loop-and-then-start-drag-and-drop/234179>\
**Category:** flash\
**Created:** [July 31, 2007, 8:46am UTC](https://forum.kirupa.com/t/how-to-create-movieclips-using-a-loop-and-then-start-drag-and-drop/234179 "2007-07-31T08:46:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mippzon](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@Mippzon](https://forum.kirupa.com/u/Mippzon)\
**Post date:** [July 31, 2007, 8:46am UTC](https://forum.kirupa.com/t/how-to-create-movieclips-using-a-loop-and-then-start-drag-and-drop/234179/1 "2007-07-31T08:46:59Z")

</div>

Hey!

Can anyone help me? Having some trouble here, but I guess it’s just a simple problem. However, I want to create some instances of a movieclip thats in my library.

for (var i = 0; i\<3; i++) {  
this.attachMovie(“klump”, “k”+i, i, {\_x:100+i\*100, \_y:100});  
}

This code works. Then I want to startDrag all of them, in the same loop. How to?  
I’vre tried “k”+i.startDrag(this) but that won’t work. Any other good guesses?

Thanks in advance
