Hair pulling Type 1009 error thrown on a button instance!

I have a site I’m maintaining that consists of multiple pages that tween in their menus on a single monstrous AS2 timeline. I’ve broken the timeline into their own swfs that I want to now network with a swf loader and AS3 code. I’ve kept the timeline tween-ins, after stripping the AS2 code off all buttons. I put the AS3 code on the last frame of the timeline in an .as layer.

So on the main page, on the last frame of the animation in an ActionScript layer, I put the following:


var defaultSwf:URLRequest=new URLRequest("defaultHeadShot.swf");
var swfLoader:Loader=new Loader();
swfLoader.load(defaultSWF);
addChild(swfLoader);

var GalleryReq:URLRequest=new URLRequest("swfs/gallery.swf");

//////////////in the debug panel this line is pointed at as the gum-up.
gallery_btn.addEventListener(MouseEvent.CLICK, btnClick);

function btnClick(event:Event):void
{
    removeChild(swfLoader);
    var newSWFRequest:URLRequest=newURLRequest("swfs/"+event.target.name+".swf");
    swfLoader.load(newSWFRequest)
    addChild(swfLoader);
}

I keep getting the Type 1009 error.

Any ideas as to what could be causing it? I’m trying not to have to rebuild the graphics from the ground up, which it doesn’t seem like I will have to do. I think it’s probably got something to do with putting all the code at then end of these complex tweening timelines, and that a line of code that offers a scoping cue might be the answer, but I’m stumped.

Thanks,

TD