Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I suggest detecting the window focus events onblur and onfocus ( <a href="http://www.devguru.com/technologies/ecmascript/quickref/evHan_onBlur.html" rel="nofollow noreferrer">http://www.devguru.com/technologies/ecmascript/quickref/evHan_onBlur.html</a> ) in Javascript then sending an enable / disable call through to the SWF file using ExternalInterface ( <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html</a> ) So inside your HTML you might have something like this (assuming swfobject here, but this isn't necessary <a href="http://code.google.com/p/swfobject/" rel="nofollow noreferrer">http://code.google.com/p/swfobject/</a> ):</p> <pre><code>swfobject.embedSWF("mySWF", "mySWFId", swfWidth, swfHeight, "10.0.0", "", flashvars, params, attributes); window.onblur=function () { if ( document.getElementById("mySWFId").disableMouseScrolling) { document.getElementById("mySWFId").disableMouseScrolling(); } } window.onfocus=function () { if ( document.getElementById("mySWFId").enableMouseScrolling ) { document.getElementById("mySWFId").enableMouseScrolling(); } } </code></pre> <p>And inside your SWF file some equivalent ExternalInterface code to hook up the methods:</p> <pre><code>public class MyApplication extends ... { public function MyApplication ():void { ExternalInterface.addCallback("disableMouseScrolling", disableMouseScrolling); ExternalInterface.addCallback("disableMouseScrolling", enableMouseScrolling); ... } private function disableMouseScrolling ():void { } private function enableMouseScrolling ():void { } ... } </code></pre> <p>Hope this helps. I've used it with IE8, Firefox 3 and Crome 4.</p> <p>Regards,</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload