# Removing a movieclip

**URL:** <https://forum.kirupa.com/t/removing-a-movieclip/230912>\
**Category:** Uncategorized\
**Created:** [June 29, 2007, 10:33pm UTC](https://forum.kirupa.com/t/removing-a-movieclip/230912 "2007-06-29T22:33:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cedwyn](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@Cedwyn](https://forum.kirupa.com/u/Cedwyn)\
**Post date:** [June 29, 2007, 10:33pm UTC](https://forum.kirupa.com/t/removing-a-movieclip/230912/1 "2007-06-29T22:33:42Z")

</div>

Edit - I solved the problem seconds after this post… I didn’t extend the movieclip properties in the script object… Grrrrrrr. 🙂

Hey all,

This problem is making me go hairless ☹

Basically I have a script attached to a movieclip, so when the mc loads it inherits all the script functions. I load the mc with an attachMovie, such as:  
var temp\_mis:MovieClip = \_root.attachMovie(“Bullet”, “Bullet”+\_global.misNum, \_root.getNextHighestDepth(), {\_x:newx, \_y:newy});  
temp\_mis.setAll(“Bullet”, 1, 5, 0, 15, 500, target);

Inside the bullet mc I have seperate scripting to see when/if the bullet hits the target. And when it does, it needs to remove itself. However when I trace itself after the this.removeMovieClip() command, it still says its name as if it never was deleted. And ofcourse, the ‘bullet’ keeps on moving on the screen.

When I try to trace the bullets depth, it gives me undefined. I was thinking of replacing the bullet’s depth with a blankMC of the same depth, effectively removing it - but I cannot find its depth… which stops that solution.

Does anyone know what I am doing wrong, or have an idea on what I can do to solve this problem?

Thank you,  
Cedwyn
