Controlling main timeline from dynamic .swf

OK, this could be a very simple answer, but…

I have a main.swf which plays, then stops, loads a dynamic .swf… And what I want is, from either the dynamic .swf or the main one, when the dynamic .swf is finished, the main .swf will continue/play.

Thanks in advance for any help given.