[Xerte] Re: Desktop AS2 version - shutdown cleanup

KnowledgeWare knowledgeware at kccsoft.com
Fri Jan 10 04:30:59 GMT 2014


Index.html loads my RLO, and my RLO loads a SWF menu file. If the user
clicks the "X" to close down index.html I'd like to call a function in the
SWF file (loaded by the RLO) to write a cookie.

 

The code below (in IE at least) shows a popup alert message when the user
clicks on the 'X' in the upper right corner to shut down the window. Anyone
know if I can  / what syntax I'd use to call a function in the SWF file?

 

RonM2

 

 

function DetectBrowserExit()

{

alert('Execute task which do you want before exit');   // HOW CAN I CALL A
FLASH FUNCTION FROM HERE??

}

window.onbeforeunload = function(){ DetectBrowserExit(); }

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Tuesday, January 07, 2014 1:11 AM
To: Xerte discussion list
Subject: [Xerte] Re: Desktop AS2 version - shutdown cleanup

 

I don't think you can trap that event in Flash without some jiggery pokery:
you'd have to intercept in in javascript in the browser and then try and do
what you need to (I think)

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of KnowledgeWare
Sent: 07 January 2014 06:04
To: 'Xerte discussion list'
Subject: [Xerte] Re: Desktop AS2 version - shutdown cleanup

 

I have one app I'd like to finish in the xerte desktop version. It uses a
Flash swf menu which works with cookies. Does anyone know what happens if
the user clicks the X in the upper right corner and closes the window - is
there a way to intercept that event and do some 'cleanup' - like writing the
cookie to the hard drive for reading in on next opening?

 

RonM2

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20140109/7950417d/attachment.html>


More information about the Xerte mailing list