Detect when FLV is finished

Hi All,
Anyone know of a tutorial or a script/command to detect when an FLV is finished playing, so that I can load up the next FLV?

Thanks.