# How do I use unloadAndStop?

**URL:** <https://forum.kirupa.com/t/how-do-i-use-unloadandstop/279563>\
**Category:** Uncategorized\
**Created:** [January 16, 2009, 3:27am UTC](https://forum.kirupa.com/t/how-do-i-use-unloadandstop/279563 "2009-01-16T03:27:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkradio](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@darkradio](https://forum.kirupa.com/u/darkradio)\
**Post date:** [January 16, 2009, 3:27am UTC](https://forum.kirupa.com/t/how-do-i-use-unloadandstop/279563/1 "2009-01-16T03:27:46Z")

</div>

I have several buttons which load an external swf into a loader.  
Here is the code for three of the buttons:

```auto
reelButton.addEventListener(MouseEvent.CLICK, reel);
function reel(event:MouseEvent):void {
var reelLoader:Loader = new Loader();
addChild(reelLoader);
var url:URLRequest = new URLRequest("reel.swf");
reelLoader.load(url);
}

studioButton.addEventListener(MouseEvent.CLICK, studio);
function studio(event:MouseEvent):void {
var studioLoader:Loader = new Loader();
addChild(studioLoader);
var url:URLRequest = new URLRequest("studio.swf");
studioLoader.load(url);
}

faqButton.addEventListener(MouseEvent.CLICK, faq);
function faq(event:MouseEvent):void {
var faqLoader:Loader = new Loader();
addChild(faqLoader);
var url:URLRequest = new URLRequest("faq.swf");
faqLoader.load(url);
}

```

The site is temporarily posted here [http://markac.com/](http://markac.com/)

As you can see the “reelButton” loads a swf with video and audio.  
The problem is that the audio from the “reel” page continues to play when I load a new page.  
How would modify this code in order to implement the “unloadAndStop” function in AS3 so that when I click on the “studioButton” and the “faqButton” the sound which was loaded from the “reelButton” will unload and Stop?
