# Unloading a child movie

**URL:** <https://forum.kirupa.com/t/unloading-a-child-movie/24490>\
**Category:** Uncategorized\
**Created:** [July 1, 2003, 12:10pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490 "2003-07-01T12:10:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nasih](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nasih](https://forum.kirupa.com/u/nasih)\
**Post date:** [July 1, 2003, 12:10pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490/1 "2003-07-01T12:10:59Z")

</div>

Hi all,

The first movie is “Home.swf” and I loaded another movie called “childOne.swf” in to the home.swf by this command \_root.holder.loadMovie(“childOne.swf”);, it works fine.

But i need to remove the “childOne.swf” , when clicked on that … How ?

i tried with this "removeMovieClip(“childOne.swf”) But its giving error…

Plz help me …

---

<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:** [July 1, 2003, 12:20pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490/2 "2003-07-01T12:20:46Z")

</div>

you could _bump_ it out by loading another movie to take it’s place, a blank one if that’s what you want

---

<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:** [July 1, 2003, 12:31pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490/3 "2003-07-01T12:31:03Z")

</div>

You can do it this way as well, but it requires that you create an empty movieclip to load your external movie. Try something like this:[AS]\_root.createEmptyMovieClip(“emptyMC”, 2);  
\_root.emptyMC.loadMovie(“childOne.swf”);  
\_root.emptyMC.\_x = 145;  
\_root.emptyMC.\_y = 120;[/AS]  
You can also specify where you want that newly created movie clip to be on the x and y cordinates.

To unload it you would now use this:[AS]\_root.emptyMC.removeMovieClip();  
[/AS]  
removeMovieClip will only unload movie clips that are created with createEmptyMovieClip or attachMovieClip.

---

<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:** [July 1, 2003, 1:33pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490/4 "2003-07-01T13:33:01Z")

</div>

Hi Friends,

Thanks very much.  
It works great…!!

For loading…\>\>  
\_root.createEmptyMovieClip(“emptyMC”, 2);  
\_root.emptyMC.loadMovie(“subOne.swf”);  
\_root.emptyMC.\_x = 0;  
\_root.emptyMC.\_y = 0;

… AND…

and for UNnloading…\>\>

\_root.emptyMC.removeMovieClip();

Thanks : i am only 6 month aged [flash]

🙂 🙂

---

<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:** [July 1, 2003, 7:52pm UTC](https://forum.kirupa.com/t/unloading-a-child-movie/24490/5 "2003-07-01T19:52:13Z")

</div>

You’re welcome, I’m glad it worked for you. Also, welcome to the forum. =)
