Closing the flash player

I want to know when the user closes the flash player. Is it possible to get an event or is there a certain parameter that indicates this kind of action?

For example running the SWF through the Flash Player or on a browser, and indicating when it is closed.

Thanks,
OML