Unloading swfs within a loaded swf

Unloading swfs within a loaded swf.

My main movie has buttons to load and unload a number of swfs.

All works fine except for one particular loaded swf(let’s call this “loaded. SWF”, which also loads and unloads its own swfs.

Sometimes, after unloading “loaded. swf” from the main movie, I get the following:

“TypeError: Error #1009: Cannot access a property or method of a null object reference.”

The object it refers to is in an swf loaded into “loaded. swf”, which I assume has not unloaded along with it’s parent.

From the main movie, how can I tell my loaded .swf child assets to disable themselves, prior to unloading loaded.swf itself?