# How do you get rid of an swf after loading it?

**URL:** <https://forum.kirupa.com/t/how-do-you-get-rid-of-an-swf-after-loading-it/278500>\
**Category:** flash\
**Created:** [December 31, 2008, 7:06am UTC](https://forum.kirupa.com/t/how-do-you-get-rid-of-an-swf-after-loading-it/278500 "2008-12-31T07:06:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tibberous](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tibberous](https://forum.kirupa.com/u/tibberous)\
**Post date:** [December 31, 2008, 7:06am UTC](https://forum.kirupa.com/t/how-do-you-get-rid-of-an-swf-after-loading-it/278500/1 "2008-12-31T07:06:20Z")

</div>

I have an swf that I load to the stage. When a button is hit, I want to get rid of it and free up everything so it can be loaded again.

I have three objects, the URLRequest, a Loader, and a MovieClip. I use the onLoad event of the Loader to attach the loaders loadEvent.currentTarget.content to the window. I tried removing the window with removeChild, but I’m still getting sound from the loaded swf.

Any ideas?
