Mouse scroll wheel not sent to Flash Player

Flex / AIR , Flash Add comments

We've been working with Flare recently to visualize potential learner flows through elearning courses.  One of the cool features within flare is the ability to zoom in on a visualization via the mouse scrollwheel, similar to the browsers Ctrl-Scoll functionality to change font sizes.

Everything works fine in Flex, using the default html publishing templates, but we found that the scoll message was not being propigated through when using SWFObject.

I updated the code to the latest swfobject version (v 2.0), but still no love.  After trolling the web for a while, I discovered that there are a number of issues involving wmode="transparent".  By removing that attribute, everything started working.  Unfortunately, I am not sure whether the real issue was a combination of an older version of swfobject and the wmode bug, or whether simply turning off wmode in the older version would have fixed the problem.

Here's the syntax:

	<script type="text/javascript">
// <![CDATA[
var flashvars = {
config: "/files/simFlow/config.xml"
};
var params = {
//using wmode transparent causes mouse click wheel support to break
//wmode: "transparent"
};
var attributes = {
id: "simflow",
name: "simflow",
style: "width:100%; height:100%;"
};

var so = swfobject.embedSWF("someFlashFile.swf", "simFlow", "100%", "100%", "9.0.115", "/files/flexSupportFiles//swfobject2/expressInstall.swf", flashvars, params, attributes);
// ]]>
</script>
<div id="simFlow" style="width:100%; height:100%;">&nbsp;</div>

2 responses to “Mouse scroll wheel not sent to Flash Player”

  1. Cole Says:
    Hey. Great info. That was the exact problem i was having. Simply removed the wmode, which wasn't needed anyways, and it worked like a charm. Thanks!
  2. pawanamishra Says:
    Well this is very interesting indeed.Would love to read a little more of this. Great post. Thanks for the heads-up…This blog was very informative and knowledgeable

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio