Monday, December 16, 2013
handle close event of browser in flash
<script><![CDATA[function(){function callback' + ExternalInterface.objectID+' (){ var fobj = get' + ExternalInterface.objectID + '("' + ExternalInterface.objectID + '"); fobj.callbeforeunload();}function get' + ExternalInterface.objectID + '(movieName) { if (window.document[movieName]) {return window.document[movieName];}if (navigator.appName.indexOf("Microsoft Internet") == -1) {if (document.embeds && document.embeds[movieName])return document.embeds[movieName];}else {return document.getElementById(movieName);}} window.addEventListener?window.addEventListener("beforeunload", callback' + ExternalInterface.objectID+', true):window.attachEvent && window.attachEvent("onbeforeunload" , callback' + ExternalInterface.objectID + ');}]]></script>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment