# Any event for Flash ending?

**URL:** https://forum.kirupa.com/t/any-event-for-flash-ending/2909
**Category:** flash
**Created:** [March 12, 2002, 10:20pm UTC](https://forum.kirupa.com/t/any-event-for-flash-ending/2909 "2002-03-12T22:20:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 12, 2002, 10:20pm UTC](https://forum.kirupa.com/t/any-event-for-flash-ending/2909/1 "2002-03-12T22:20:20Z")

</div>

I want to be able to inform an HTTPserver with a GET request when the user “gets out of Flash.” By that, I mean either (a) the user switches away from the web page that contains the embedded SWF, or (b) the user closes his Flash Player. In other words, I cannot expect the user to cleanly exit the Flash application.\r\rIs there a way to trap this event?\r\rThank you

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 12, 2002, 10:31pm UTC](https://forum.kirupa.com/t/any-event-for-flash-ending/2909/2 "2002-03-12T22:31:11Z")

</div>

How can you “close your flash player”?!\rwhy not just do something onUnload of the page containing the swf?\rWhat exactly is it you wanna do?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 13, 2002, 1:30am UTC](https://forum.kirupa.com/t/any-event-for-flash-ending/2909/3 "2002-03-13T01:30:57Z")

</div>

By “close the Flash player” I mean if I were to run the SWF directly, not from a web page, (e.g. download the SWF file and either double-click it or open it from Flash Player), and while the SWF is playing, I were to close its window.\r\rAs for a Flash SWF that’s embedded in a web page, while the Flash is playing is the browser, I switch to another web page, or close the browser window.\r\rIn the above two scenarios, I want to do something at the point in time just before the Flash animation ends.\r\rFor anyone familiar with windows programming, I am trying to simulate a WINDOW\_DESTROY event.\r\rThe movieclip “unload” event it not triggered in the above cases. I would like to trap that event to, say, message a server that the user has “left” or discontinued watching the movie. In the case of online courses, this is a way (I thought) that I could, know when the student has “left” the course.\r\rThanks
