Preloading / external .swf issues

I’m quite new to Flash & total noob in AS 3.0, little help pls !!

I’m trying to create app. that has 3 main buttons that goto 3 pages each with 15-30 buttons that each load external .swf that covers most of primary swf xpt 3 main buttons. Clicking on those 3 main buttons should unload previously loaded .swf and each loaded .swf should have preloader in its start.

I’ve managed to mix up some script, but got few things that dont work and i don’t understand why… ;( pls help !
1.) preloader works fine when i launch file separately, but when i load it from main .swf, it just shows “100%” at once… ;(
2.) 3 main buttons doesn’t seem to unload loaded .swf… ;(

Main .swf code:

nr1_btn.addEventListener(MouseEvent.CLICK, nr1);
nr2_btn.addEventListener(MouseEvent.CLICK, nr2);
nr3_btn.addEventListener(MouseEvent.CLICK, nr3);

A1_btn.addEventListener(MouseEvent.CLICK, A1);
A2_btn.addEventListener(MouseEvent.CLICK, A2);
// etc.


var loader:Loader = new Loader();


function nr1(event:MouseEvent):void{
    var loader:Loader = Loader(event.currentTarget);
    loader.unload();
    removeChild(loader);
    gotoAndStop(50)
}
function nr2(event:MouseEvent):void{
    var loader:Loader = Loader(event.currentTarget);
    loader.unload();
    removeChild(loader);
    gotoAndStop(100)
}
function nr3(event:MouseEvent):void{
    var loader:Loader = Loader(event.currentTarget);
    loader.unload();
    removeChild(loader);
    gotoAndStop(150)
}


function A1(event:MouseEvent):void{
loader.load(new URLRequest("A1.swf"));
    var child = addChild(loader);
    child.x = 120;
    child.y = 0;
}
function A2(event:MouseEvent):void{
loader.load(new URLRequest("A2.swf"));
    var child = addChild(loader);
    child.x = 120;
    child.y = 0;
}
// etc.


stop();

Preloader code:
[LEFT]

stop();

this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void {

    var total:Number = this.stage.loaderInfo.bytesTotal;
    var loaded:Number = this.stage.loaderInfo.bytesLoaded;

    preloader_mc.loader_mc.scaleX = loaded/total;
    preloader_mc.loaded_txt.text = Math.floor((loaded/total)*100)+ "%";

    if (total == loaded) {
        play();
        this.removeEventListener(Event.ENTER_FRAME, loading);
    }
}

[/LEFT]