Unfortunately that is not an option. This is a video player tracking system on 
a very public landing page. 

Would onbeforeunload work better? Is there a way to just delay the closing of a 
page before it happens (behind the scenes)?

Any other javascript events that would work better?

----------------------------------------
From: Seth Hodgson <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2008 10:32 AM
To: "[email protected]" <[email protected]>
Subject: RE: [flexcoders] Call Flex from JavaScript 

You need to pop a Javascript alert in your trackClosing() method to keep the 
browser from closing until the user clicks the OK button.

This technique is a hack, but an alert generally leads to a long enough delay 
in user interaction (say a second or two) to finish making your call into the 
Player before the browser process exits.

Best,

Seth

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz

Sent: Tuesday, December 09, 2008 10:26 AM

To: [email protected]

Subject: RE: [flexcoders] Call Flex from JavaScript

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?



Reply via email to