Based on that and other examples, I tried this:
<script language="JavaScript" type="text/javascript">
window.onunload = trackClosing;
function trackClosing(){
document.getElementById("FXVideo").tagWithClosed();
}
</script>
In my constructor I have:
if (ExternalInterface.available){
ExternalInterface.addCallback("tagWithClosed",windowClosed);
}
It doesn't seem to work. Any ideas on what I am doing wrong?
----------------------------------------
From: Seth Hodgson <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2008 9:50 AM
To: "[email protected]" <[email protected]>
Subject: RE: [flexcoders] Call Flex from JavaScript
This page in the LCDS docset describes this specifically:
http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lcconnections_4.html#1074309
The scenario in the docs is dealing with notifying the server that the client
is going away, in order to short-circuit the slower normal notification based
on server session timeout. But you could use the same technique to achieve
other things as well.
Best,
Seth
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008 6:28 PM
To: [email protected]
Subject: [flexcoders] Call Flex from JavaScript
Using a set up in my ActionScript of:
ExternalInterface.addCallback("tagWithClosed",windowClosed);
How can I write a JavaScript function that calls 'tagWithClosed' to Flex when
the user closes the window (window.close() ) or when they leave for another
page?