define('DISALLOW_FILE_EDIT', true);{"id":140,"date":"2009-04-17T18:45:10","date_gmt":"2009-04-17T23:45:10","guid":{"rendered":"http:\/\/www.unfocus.com\/?p=140"},"modified":"2009-06-11T14:04:26","modified_gmt":"2009-06-11T19:04:26","slug":"mousewheel-on-mac","status":"publish","type":"post","link":"http:\/\/www.unfocus.com\/2009\/04\/17\/mousewheel-on-mac\/","title":{"rendered":"MouseWheel on Mac"},"content":{"rendered":"

So for some reason MouseWheel.SCROLL events don’t work on Mac OS X. There is a fix! Gabriel over at Pixel Breaker<\/a> created a script<\/a> which fixes it up nicely.<\/p>\n

The script did require some modification to get it to work with SwfHTML<\/a>, since it was designed to work with SwfObject<\/a>. It took very little modification to the JavaScript to make it work with any flash embedding script. The script has a register method that takes an id, and uses SwfObject’s getObjectById<\/a> method to get the swf ref – I just changed the register method to take a swf reference instead of an id string, and viola! It works with anything now. While I was at it, I also took care of some errors you might get on non-mac browsers. Here’s how to use it:<\/p>\n

[cc lang=’javascript’ ]
\n\/\/ with SwfHTML
\nswfmacmousewheel.registerObject(
\nunFocus.SwfUtilities.getSwfReference(“swfId”)
\n);<\/p>\n

\/\/ with SwfObject
\nswfmacmousewheel.registerObject(
\nSwfObject.getObjectById(“swfId”)
\n);
\n[\/cc]<\/p>\n

You can really use any method you want to get a reference to the swf object, and pass that in.<\/p>\n

Here is the updated swfmacmousewheel javascript file<\/a>. Note, you will still need to grab the source and follow the instructions from Pixel Breaker<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

So for some reason MouseWheel.SCROLL events don’t work on Mac OS X. There is a fix! Gabriel over at Pixel Breaker created a script which fixes it up nicely. The script did require some modification to get it to work with SwfHTML, since it was designed to work with SwfObject. It took very little modification … Continue reading “MouseWheel on Mac”<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37],"tags":[33,35,32,31],"_links":{"self":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/140"}],"collection":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":13,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":331,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/140\/revisions\/331"}],"wp:attachment":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}