# Event listener when closing Flash application?

**URL:** https://forum.kirupa.com/t/event-listener-when-closing-flash-application/271710
**Category:** flash
**Created:** [September 26, 2008, 6:20pm UTC](https://forum.kirupa.com/t/event-listener-when-closing-flash-application/271710 "2008-09-26T18:20:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zomis](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@Zomis](https://forum.kirupa.com/u/Zomis)
#### Post date: [September 26, 2008, 6:20pm UTC](https://forum.kirupa.com/t/event-listener-when-closing-flash-application/271710/1 "2008-09-26T18:20:31Z")

</div>

Is there some way to call a function when the flash window is closing down?

There are some concerns in my online game that people can “cheat” by closing down the window when losing against a computer controlled opponent, and I am trying to find out a way to prevent this “cheating”.
