# \[FMX\] Common question: AttachMovie

**URL:** <https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305>\
**Category:** flash\
**Created:** [January 29, 2003, 2:01pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305 "2003-01-29T14:01:50Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![FLATLINE\_\_](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FLATLINE\_\_](https://forum.kirupa.com/u/FLATLINE__)\
**Post date:** [January 29, 2003, 2:01pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/1 "2003-01-29T14:01:50Z")

</div>

I tried looking for it in the forums because I was sure other people already asked about this, and they did, but none of them got an answer suitable for my situation…

I got a shootout game, when I kill a monster I want it to duplicate until a certain variable reaches a certain number but I keep having problems with it.

Any suggestions?

---

<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:** [January 29, 2003, 2:55pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/2 "2003-01-29T14:55:36Z")

</div>

> \*Originally posted by **FLATLINE** \*  
> \*\*I got a shootout game, when I kill a monster I want it to duplicate until a certain variable reaches a certain number but I keep having problems with it.

Any suggestions? \*\*

duplicate it that number of times? is this duplicate as in duplicateMovieClip or as in attachMovie? … shoudnt it go away after you shoot it?

---

<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:** [January 30, 2003, 5:48am UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/3 "2003-01-30T05:48:58Z")

</div>

OK look, I got a monster on stage, it has all the animations and \*\*\*\*, it can shoot, it can die and it can move. What I want is that after I kill it (after it plays the death animation), the monster will be duplicated, ie another one will show up. Prefferably the first monster shouldn’t dissapear but I don’t know if that’s even possible.

I don’t know if I should use duplicateMovie or attachMovie because I don’t really know how to use any of them right…

---

<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:** [January 30, 2003, 2:50pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/4 "2003-01-30T14:50:44Z")

</div>

if you only have one monster on the screen at a time… or even if you are using more and you just want to replace a dead one continuously, you dont have to remove it and replace it at all. Just use the same one over again.

normal:  
-playing moving/shooting frames

death:  
-playing dying sequence  
-last frame of death is empty frame

^on that empty frame (where its no longer visible on the screen), move the monster to a new location and make him appear as a new one telling it to go back to its ‘normal’ state.

---

<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:** [January 30, 2003, 9:41pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/5 "2003-01-30T21:41:25Z")

</div>

But I DON’T want the monster to dissappear, how can I do that?? :q:

---

<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:** [February 1, 2003, 4:23pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/6 "2003-02-01T16:23:50Z")

</div>

Bump! This is important!

---

<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:** [February 2, 2003, 3:18pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/7 "2003-02-02T15:18:52Z")

</div>

Explain exactly what you want to do, I’m not sure I understand what’s supposed to happen when the monster dies :-\

---

<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:** [February 2, 2003, 7:59pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/8 "2003-02-02T19:59:11Z")

</div>

I just want a “respawn” point. That when I kill a monster, another one will show up and when I kill the second monster, a third one will show up, and so on until a certain variable reaches a certain number. The problem is, that **I don’t want the dead bodies to dissappear**.

---

<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:** [February 2, 2003, 8:11pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/9 "2003-02-02T20:11:27Z")

</div>

Well, at the end of the dying sequence, assuming that you gave a linkage name to your monster (“monster” for instance :)) put something like this:

```auto
mc=_root.attachMovie("monster",1000);
mc._y=500;
mc.onEnterFrame=monsterBehaviour;

```

Does it make sense?

pom :skull:

---

<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:** [February 2, 2003, 8:14pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/10 "2003-02-02T20:14:31Z")

</div>

Well the 1000 level there Ilyas, that will overwrite the other dead bodies, so shouldn’t it be i++ instead?

Since he wants the dead bodies to stay there dead, you would have to put it on a new level.

---

<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:** [February 2, 2003, 8:15pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/11 "2003-02-02T20:15:44Z")

</div>

Yep, you’re right :trout:

---

<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:** [February 2, 2003, 8:16pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/12 "2003-02-02T20:16:40Z")

</div>

:beam:

---

<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:** [February 2, 2003, 9:00pm UTC](https://forum.kirupa.com/t/fmx-common-question-attachmovie/12305/13 "2003-02-02T21:00:08Z")

</div>

Thanks Pom! Now I know how to use attachMovie!! :beam:  
However I just did what I didn’t think about doing before: I looked in the tutorials on [Kirupa.com](http://Kirupa.com), and I found that duplicate movie tutorial, and it helped me a lot, and now I can duplicate as much monsters as I want without the dead bodies disappearing! GOD I LOVE THIS SITE!!! :geek:

However now I got ANOTHER problem: The depths of the monsters. I opened a seperate thread for that.
