# Remove movieclip?

**URL:** <https://forum.kirupa.com/t/remove-movieclip/15561>\
**Category:** Uncategorized\
**Created:** [March 15, 2003, 7:50pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561 "2003-03-15T19:50:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mastawok](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@mastawok](https://forum.kirupa.com/u/mastawok)\
**Post date:** [March 15, 2003, 7:50pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561/1 "2003-03-15T19:50:56Z")

</div>

Ok so I used the following code from the flash mx tutorial on loading dynamic jpgs.

photo1.onRollOver = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“photos/BuriedFence.jpg”, “container”);  
container.\_x = 150 ;  
container.\_y = 147.0;  
}

but now I want the movieclip to end when you rollout. What would the code look like??

Thanks,  
Michael

---

<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 15, 2003, 7:57pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561/2 "2003-03-15T19:57:27Z")

</div>

photo1.onRollOut = function () {  
unLoadMovieNum(1);  
}

try that and let me know. I think you can just refer to the movie num now that you’ve associated it with a level…

hmm…you might have to actually use the container’s name since you probably have more than that one item on lvl 1…

photo1.onRollOut = function () {  
UnLoadMovie(“container”);  
}

I’m sort of new to flash to so if this doesn’t help let me know and i’ll look back into my files and see if i can find where i’ve used this.  
:love:

---

<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 15, 2003, 8:02pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561/3 "2003-03-15T20:02:09Z")

</div>

OK what happens if instead of on a roll out I just wanted the movieclip to unload after I click a button to go to a different section?

---

<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 15, 2003, 8:04pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561/4 "2003-03-15T20:04:27Z")

</div>

on (release) {  
createEmptyMovieClip(“container”, 1);  
container.loadMovie(“your\_mc\_here.swf”);  
container.\_x = 150;  
container.\_y = 147;  
}  
on (releaseOutside) {  
unloadMovieNum(1);  
}

put this on every button. the button will load the mc and then unload it before re-loading the new one

:love:

---

<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 15, 2003, 8:28pm UTC](https://forum.kirupa.com/t/remove-movieclip/15561/5 "2003-03-15T20:28:10Z")

</div>

although i recommend loading it on another lvl. Levels are great. Using them for this sort of thing gives you a lot of flexibility.

:love:
