Hello,

I am making my website by loading each of the external pages in to the main swf file. I've used a tutorial and it manages to load all of the correct pages when the corresponding button is pressed, however I can tell that the Unload isn't working because each page has audio and I can hear them playing over the top of each other when I navigate through the pages.

Here's the code. Can anyone tell me why it's not properly unloading the previous page?

Code:
var Xpos:Number = 0;
var Ypos:Number = 102;
var pageSWF:MovieClip;
var loader:Loader = new Loader();

var defaultSWF:URLRequest = new URLRequest("home.swf");

loader.load(defaultSWF);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);

// Btns Universal function
function btnClick(event:MouseEvent):void {

removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest(event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
}