Call a function on last frame of external SWF

I have a bunch of SWF files that have x amount of frames on them…When it reaches the end, I want to call a function. The problem is I dont have access to the FLA files. I have the total number of frames by doing


which gives me all the frames…The only thing I can think of is doing an interval that checks _currentframe against _totalframes, but I want to know is their another way to do it? Thanks.