# Duplicate Movies

**URL:** <https://forum.kirupa.com/t/duplicate-movies/2066>\
**Category:** flash\
**Created:** [June 3, 2002, 11:03pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066 "2002-06-03T23:03:12Z")\
**Posts on this page:** 11\
**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:** [June 3, 2002, 11:03pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/1 "2002-06-03T23:03:12Z")

</div>

Hello everybody,\rI have a request to build an animated escalator. How can I do this using duplicate mc. I have one stair moving along a guide, now I need it to duplicate but not all at once, maybe after 1/6 seconds or so to give the escalator effect. Any and all help is much appreciated.

---

<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:** [June 4, 2002, 9:36am UTC](https://forum.kirupa.com/t/duplicate-movies/2066/2 "2002-06-04T09:36:27Z")

</div>

The problem is : I’m not sure you can apply a guide to a movie clip with Actionscript (as a matter of fact, I’m pretty sure you can’t. What you could do then is duplicate the whole movie clip, with the guide and all, and then send it to a certain frame. I’m going to try to make an example for you.\r\rpom 0]

---

<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:** [June 4, 2002, 10:02am UTC](https://forum.kirupa.com/t/duplicate-movies/2066/3 "2002-06-04T10:02:31Z")

</div>

Ok, what I have done : I create a new movie clip. In it I put the tween I want to do, between frame 1 and frame 20. I give it the linkage name “stair” in my library and then I put this code :

```auto
 for (i=0;i<6;i++) {\r\r&nbsp &nbsp &nbsp &nbsp attachMovie("stair","t"+i,i) ;\r\r&nbsp &nbsp &nbsp &nbsp mc = _root["t"+i];\r\r&nbsp &nbsp &nbsp &nbsp mc._x = 200 ;\r\r&nbsp &nbsp &nbsp &nbsp mc._y = 200 ;\r\r&nbsp &nbsp &nbsp &nbsp mc.gotoAndPlay (3*i+1) ;\r\r}

```

pom 0]

---

<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:** [June 5, 2002, 10:00am UTC](https://forum.kirupa.com/t/duplicate-movies/2066/4 "2002-06-05T10:00:37Z")

</div>

Ok do I put that code in the frame or with the movie

---

<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:** [June 5, 2002, 12:09pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/5 "2002-06-05T12:09:26Z")

</div>

I think you may have bigger problems than that. If you’re doing a front view… you would need to use perspective on each step to make sure it looks good. Obviously… a side view would be much better, and easier…\r\rEither way it’s doable… You’ll need to determine the number of steps you will duplicate to make your effect complete… and perhaps turn the whole thing into a movie…

---

<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:** [June 5, 2002, 2:58pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/6 "2002-06-05T14:58:40Z")

</div>

In the frame. With nothing else.\r\rpom 0]

---

<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:** [June 6, 2002, 1:59pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/7 "2002-06-06T13:59:06Z")

</div>

First, thank you for the code. I’m sure it will work, but I’m not that good with action script. What do the variables do. I’m not sure how to replace them with mine.\r\rIs i the number of stairs. (I want it to be continuous)?\r\rFor mc put the instance name of my movie clip?\r\rStair is the exported name from the library?\r\rWhat is 3\*?\r\rfor (i=0;i\<6;i++) {\r attachMovie(“stair”,“t”+i,i) ;\r mc = \_root[“t”+i];\r mc.\_x = 200 ;\r mc.\_y = 200 ;\r mc.gotoAndPlay (3\*i+1) ;\r}

---

<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:** [June 7, 2002, 1:59pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/8 "2002-06-07T13:59:41Z")

</div>

This code works but it is not a continuos loop. How do I make\rit run continuously with out running out.

---

<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:** [June 7, 2002, 5:27pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/9 "2002-06-07T17:27:04Z")

</div>

It’s not supposed to stop. Can I have a look at your fla ?\r\r[ilyas.usal@club-internet.fr](mailto:ilyas.usal@club-internet.fr)\r\rpom 0]

---

<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:** [June 7, 2002, 10:16pm UTC](https://forum.kirupa.com/t/duplicate-movies/2066/10 "2002-06-07T22:16:43Z")

</div>

You put a stop action at the end of the stepguide movie clip ! Remove it and then change the number of duplications to 20 or so. You also might want to have that shape tween work right, because as it is, it doesn’t fit in so well.\r\rpom 0]

---

<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:** [June 9, 2002, 3:39am UTC](https://forum.kirupa.com/t/duplicate-movies/2066/11 "2002-06-09T03:39:44Z")

</div>

well… I came up with a non-a/s version. Rustic, but I feel it accomplishes the task. Let me know and I’ll email it to you.\r\rI say non-as…although it does have stop() and a gotoandplay().\r
