2 swfs, 2 classes (one for each), one loads the other, how to unload?

I’m having just a pickle of a time with this.

SWF A loads SWF B with addChild. SWF B covers SWF A entirely.

Now I want to unload SWF B with a button in SWF B. The button in SWF B is programmed with SWF B’s class.

From SWF B’s class I’ve tried:

removeChild(this);

and:
SWFClassA(parent).removeSWFB();

and, desperately:
removeChildAt(numChildren-2);

I get “must be child of the caller” errors or “null object reference” when I try to do this. How can I do this right or differently?

Please help. Thanks.