Hi all....

i'm trying to dynamically load in 3 photo galleries into a file. They are all SWF files. When you click the button for the thai gallery, it'll pop up. But if you want to navigate to the alex gallery, the thai gallery is still visible underneath. And the same problem with the 3rd gallery only all 3 are visible at this point. Is there a way to make these not visible?

I'm using CS4 with ActionScript 3.0 (and ibuprofen for the headache this is giving me).

I've got 3 seperate buttons set up for the 3 galleries. Is there a better method? I've tried using the removeChild(); but I don't think I've used it correctly as it throws errors all over the place when trying to use it.

Any help would be VERY appreciated. My code is as follows and Thanks!!!

Actionscript Code:
thai_btn.addEventListener(MouseEvent.CLICK, loadImages);

function loadImages(evtObj:MouseEvent):void {
    var imageLoader:Loader = new Loader();
    addChild(imageLoader);
    var url:URLRequest=new URLRequest("thaipix.swf");
    imageLoader.load(url);
    imageLoader.x=344;
    imageLoader.y=446.15;
    imageLoader.alpha=1;
}


haiti_btn.addEventListener(MouseEvent.CLICK, haitiImages);

function haitiImages(evtObj:MouseEvent):void {
    var haitiLoader:Loader = new Loader();
    addChild(haitiLoader);
    var url:URLRequest=new URLRequest("haitipix.swf");
    haitiLoader.load(url);
    haitiLoader.x=344;
    haitiLoader.y=446.15;
}


alex_btn.addEventListener(MouseEvent.CLICK, alexImages);

function alexImages(evtObj:MouseEvent):void {
    var alexLoader:Loader = new Loader();
    addChild(alexLoader);
    var url:URLRequest=new URLRequest("alexpix.swf");
    alexLoader.load(url);
    alexLoader.x=344;
    alexLoader.y=446.15;
}