When the game of an external swf is finished, remove the external swf

I am creating a series of mini games and animations and plan on bringing them all into one flash file. Each of the games need to disappear when the player has finished them. I don’t know what to put into the section in the external swfs when the game is done. I currently just have a trace (“finished”).

In my main swf you should click start and a game swf appears and when you are finished it, it should disappear.

I have looked up tutorials and they something about accessing variables in the external swfs but I got nowhere with them.