How to tell if external swf file has finished playing?

I have an external swf file loaded in a MovieClip using ‘loadMovie’, is there a method that can tell me when the swf has finished playing? Because i would like to do something immediately after the swf has finished playing (for example, remove the clip.)

Many thanks!