# Unload a movie clip within a movie clip

**URL:** https://forum.kirupa.com/t/unload-a-movie-clip-within-a-movie-clip/200522
**Category:** flash
**Created:** [September 12, 2006, 10:13pm UTC](https://forum.kirupa.com/t/unload-a-movie-clip-within-a-movie-clip/200522 "2006-09-12T22:13:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![njoay](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@njoay](https://forum.kirupa.com/u/njoay)
#### Post date: [September 12, 2006, 10:13pm UTC](https://forum.kirupa.com/t/unload-a-movie-clip-within-a-movie-clip/200522/1 "2006-09-12T22:13:43Z")

</div>

Hi all,

I am trying to unload a movie clip that is on a layer in a movie clip. After clicking on a button, I would like the movie to go back to the previous menu without playing a couple of movie clips that’s in the main movie clip.

So at the end of my movie clip I have:

\_parent.gotoAndPlay(“resources”); // resources is the frame name in the main movie clip where I would like the movie to restart from  
\_parent.vhost\_mc.unloadMovie(“vhost\_mc”); //vhost\_mc is a movie clip in the main movie clip that I want to unload  
\_parent.videoScreen\_mc.unloadMovie();

But the videoScreen\_mc doesn’t unload. The main movie clip starts with the videoScreen and I’ve actually deleted the frames of videoScreen\_mc where the “resources” frame starts, but still it appears.

I’ve even tried \_parent.videoScreen\_mc.\_visible = false; but nothing works! I’ve tried createEmptyMovieClip, but since the videoScreen\_mc is on the main timeline, I don’t think it works. I’ve even tried putting this function on the “resources” frame:

onEnterFrame = function() {  
play();  
vhost\_mc.unloadMovie(“vhost\_mc”);  
vhost\_mc.removeMovieClip();  
this.videoScreen\_mc.unloadMovie();  
this.videoScreen\_mc.removeMovieClip();  
this.mask.\_visible = false;  
}  
But when I do this, the play button loops starting at the “resources” frame.

Essentially I would like the main movie clip to play without certain movie clips that’s included within the main movie clip.

I hope I’m making sense. Please help, I’ve been at this for days!
