# Loading / Unloading / UnloadAndStop() Not working

**URL:** <https://forum.kirupa.com/t/loading-unloading-unloadandstop-not-working/327195>\
**Category:** flash\
**Created:** [February 12, 2012, 3:20pm UTC](https://forum.kirupa.com/t/loading-unloading-unloadandstop-not-working/327195 "2012-02-12T15:20:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alemieux34](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alemieux34](https://forum.kirupa.com/u/alemieux34)\
**Post date:** [February 12, 2012, 3:20pm UTC](https://forum.kirupa.com/t/loading-unloading-unloadandstop-not-working/327195/1 "2012-02-12T15:20:57Z")

</div>

I have a presentation that has 3 chapters. I’ve built functionality so that you can load each individual SWF chapter with a loader called singleLoader. I’ve also built in functionality so that at any time, you can hit the down arrow and it will unload those movies.

I have a separate button that allows you to loop through all 3 chapters. They’ll just play one after the other. The problem with this approach is that there are 2 different loaders and if I unload one of the chapters and try to start the looping, I can hear the audio, but I can’t see the movie.

Here’s the first loader:

```auto
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);

var thisMC:MovieClip = new MovieClip();
stage.addChild(thisMC); // Add empty MC initially so the nextClip function works even on first call */

// Gets the next MC, waiting for INITialization before adding it to the stage

function nextClip():void {
    thisLoader.load( new URLRequest(clips[index]) );
}

```

And here’s the kill function:

```auto
stage.addEventListener(KeyboardEvent.KEY_DOWN, quit);
function quit(e:KeyboardEvent):void{
    if (e.keyCode == Keyboard.DOWN){
        thisMC.gotoAndStop(1);
        stage.removeChild(thisMC);
        thisLoader.unloadAndStop();
        singleLoader.unloadAndStop();
        singleLoader.contentLoaderInfo.removeEventListener(Event.INIT, loadComplete);
        thisLoader.contentLoaderInfo.removeEventListener(Event.INIT, doneLoading);
    }
}

```

unloadAndStop() is supposed to remove everything, but it doesn’t. Any suggestions?
