[Xerte] Re: Desktop AS2 version - shutdown cleanup
Dave Burnett
d_b_burnett at hotmail.com
Fri Jan 10 17:41:18 GMT 2014
<pseudo>
//in your js, get the embed element of the Xerte swffid = document.getElementById('the swf name')
// call the function in the swffid.yourFunctionName(parametersIfAny);
</pseudo>
From: knowledgeware at kccsoft.com
To: xerte at lists.nottingham.ac.uk
Date: Thu, 9 Jan 2014 20:30:59 -0800
Subject: [Xerte] Re: Desktop AS2 version - shutdown cleanup
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
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20140110/cb472121/attachment.html>
More information about the Xerte
mailing list