# attachMovieClip

**URL:** <https://forum.kirupa.com/t/attachmovieclip/16185>\
**Category:** flash\
**Created:** [March 21, 2003, 10:57pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185 "2003-03-21T22:57:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![geedogg](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@geedogg](https://forum.kirupa.com/u/geedogg)\
**Post date:** [March 21, 2003, 10:57pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/1 "2003-03-21T22:57:52Z")

</div>

when i use attachMovieClip, is there some way i can make it go ontop of the old clip. so that when the new one is finshed “building” over it i can remove the old one, preventing a stackup???

---

<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:** [March 21, 2003, 11:00pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/2 "2003-03-21T23:00:18Z")

</div>

building?

… the depth argument specifies arrangement position

---

<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:** [March 21, 2003, 11:01pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/3 "2003-03-21T23:01:54Z")

</div>

sorry=) i mean when the new clips is finished playing id like to remove the old one. But NOT before!

Im desperat!!!

---

<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:** [March 21, 2003, 11:05pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/4 "2003-03-21T23:05:44Z")

</div>

at the end of the new one put the code to remove the old using removeMovieclip()

---

<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:** [March 21, 2003, 11:10pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/5 "2003-03-21T23:10:34Z")

</div>

ive tryed that. The problem is it removes everything!

this is the code im using. Im not sure what to do. I now have it attaching in “this” but then everything is removed.

on (release) {  
var newMc = this.attachMovie(“kompetansemain”, “kompetansemain\_1”, 1);  
newMc.\_x = 0;  
newMc.\_y = 0;  
}

Where shold i attach it? and is there someting like \_root or \_parent i should use when i remove it???

Yes, i realy dont know what the hell im doin right now=)

---

<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:** [April 12, 2003, 11:23pm UTC](https://forum.kirupa.com/t/attachmovieclip/16185/6 "2003-04-12T23:23:47Z")

</div>

haha… ok, I think I know the answer… if you do this.attachmovie, and then delete the original clip, you’re going to erase everything… what you should do is \_root.attachmovie instead
