stop audio when movie stops

I have a movie player on a window. when I close the window with the quicktime movie, the window goes away but the audio keeps playing. How do I get the audio to stop.

In the windows Close event, stop the movie.


yup got it thanks. on another note, how do I get apple+w to close the window

make a menuitem “Close” with the keyboard equivalent “cmd-W” in the menubar editor
then answer to the above menu handler in your window

Why do you hijack an unrelated thread when people are trying to assist in the thread you already started