Actionscript 3.0 loading swf movie clip issue

Hi everyone,

Let me begin by saying I am a novice at actionscript so excuse me if my lingo isnt up to par.

I am a photographer trying to create a multi-slide show website by using a loader to open up the slideshows upon button hit. For example I have portraits music and advertising. when i hit portrait the portrait slideshow pops up. When I hit music the music slidshow pops up and “voids” the previous slideshow.

everything is fine with the the button behavior the issue is when the swf slideshow opens in the movieclip box it wont let me scroll through the images, everytime I hit a different image it takes me back to the first 1.

I opened just the swf file alone and it works fine! i dont get it

heres my as

var Xpos:Number = 110;
var Ypos:Number = 180;
var swf;MovieClip;
var loader:Loader = new Loader();

var defaultSWF:URLRequest = new URLRequest(“gallery1.swf”);

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

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);

}

portrait.addEventListener(MouseEvent.CLICK, btnClick);

music.addEventListener(MouseEvent.CLICK, btnClick);