Assuming you know how to use the ON IDLE command in Applescirpt, I can guess at two ways:
- get the movie’s duration, convert it to seconds, then use it in an ON IDLE movie_duration…END IDLE
- when opening the movie in QT4.1, use the “close when done” option. If QT opens only 1 file at a time, then within an ON IDLE construct, ask if a movie exists or ask its name (within a TRY… ON ERROR command), when the test fails, the movie has closed.