# attachMovie() ...how do i unload the movie?

**URL:** <https://forum.kirupa.com/t/attachmovie-how-do-i-unload-the-movie/2740>\
**Category:** Uncategorized\
**Created:** [April 24, 2002, 8:08pm UTC](https://forum.kirupa.com/t/attachmovie-how-do-i-unload-the-movie/2740 "2002-04-24T20:08:44Z")\
**Posts on this page:** 2\
**Page:** 1

<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 24, 2002, 8:08pm UTC](https://forum.kirupa.com/t/attachmovie-how-do-i-unload-the-movie/2740/1 "2002-04-24T20:08:44Z")

</div>

I have a button, that, when you press it, loads an external SWF while going to a transitional “Loading …” screen. Afterwards, I want the loading screen to disappear, and have my portfolio.swf become visible. My code is as follows:\r\r////////////////////\ron (release) {\r&nbsp &nbsp &nbsp &nbsp \_root.attachMovie(“loadTransition”, “t\_load”, 0); // attach the loading movie clip\r&nbsp &nbsp &nbsp &nbsp setProperty(“t\_load”, \_x, 325);\r&nbsp &nbsp &nbsp &nbsp setProperty(“t\_load”, \_y, 200);\r&nbsp &nbsp &nbsp &nbsp \_root.loadMovieNum(“portfolio.swf”, 1); // load the portfolio\r&nbsp &nbsp &nbsp &nbsp \r&nbsp &nbsp &nbsp &nbsp while (\_level1.getBytesLoaded() !== \_level1.getBytesTotal()) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp i = 0; // delay everything until it loads&nbsp &nbsp &nbsp &nbsp \r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp \_root[“t\_load”][“loadingText”].gotoAndPlay(3); // send it to the frame that says “Done.”\r\r // insert unattach code here:\r}\r//////////////////////////\r\rNow, I need to figure out how to unattach my attached movie clip (loadTransition) and make it so portfolio.swf shows. Any thoughts?\r\rThanks,\rDavid Balatero

---

<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 24, 2002, 11:22pm UTC](https://forum.kirupa.com/t/attachmovie-how-do-i-unload-the-movie/2740/2 "2002-04-24T23:22:42Z")

</div>

as long as you’re using the attach method,\r\rremoveMovieClip();\r\rshould work fine
