# Duplicate movieclip questions

**URL:** <https://forum.kirupa.com/t/duplicate-movieclip-questions/260514>\
**Category:** programming\
**Created:** [May 16, 2008, 11:13am UTC](https://forum.kirupa.com/t/duplicate-movieclip-questions/260514 "2008-05-16T11:13:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Pancake](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mr\_Pancake](https://forum.kirupa.com/u/Mr_Pancake)\
**Post date:** [May 16, 2008, 11:13am UTC](https://forum.kirupa.com/t/duplicate-movieclip-questions/260514/1 "2008-05-16T11:13:49Z")

</div>

Helllo,

I’m a new learner to actionscript, before i just copy and pasted code, wich wasn’t very helpfull. now i’m kinda experimenting with actionscript but written out of mind.

i made a rocket wich follows your mouse, with a neat trail that also follows your mouse.

that works fine, but now i want a row of enemies to come out of the left of the screen.  
what do i add to make the enemies duplicated? if i add duplicate movieclip the enemies will come. but the rocket won’t follow the mouse and the trail won’t work.

another question: how do i make it so a movieclip is being duplicated every 5 seconds or so? not on every frame?

thanks in advance , file is attached

---

<div class="post-metadata">

**Author:** ![bluemagica](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@bluemagica](https://forum.kirupa.com/u/bluemagica)\
**Post date:** [May 16, 2008, 11:25am UTC](https://forum.kirupa.com/t/duplicate-movieclip-questions/260514/2 "2008-05-16T11:25:35Z")

</div>

looks like wrong file but, it seems enemys you are trying to createare the same movieclip as the player itself, and since you have most probably put AS in the mc instead of frame…the code is colliding with eachother. From now on, try to put all you code on the timeline, and preferably at one place.

Also to set gap use setInterval

intervalID=setInterval(function\_name,time in between executions)

---

<div class="post-metadata">

**Author:** ![Mr\_Pancake](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mr\_Pancake](https://forum.kirupa.com/u/Mr_Pancake)\
**Post date:** [May 16, 2008, 1:49pm UTC](https://forum.kirupa.com/t/duplicate-movieclip-questions/260514/3 "2008-05-16T13:49:59Z")

</div>

ah yes, sorry here is the right file.

94 kb , so heres a rar [http://upl.iwgupl.info/uploads/5oys6vv/randomness.rar](http://upl.iwgupl.info/uploads/5oys6vv/randomness.rar)

and the set interval, should it be something like this?:

ball=setInterval(function\_ball,4)
