In many of the Spark Projects presentation there is one tine little class presented that actually really rocks: the SWFWheel.
In fact Izukawa’s little project has no other purpose but fixing the mouse wheel event for the mac. For those who don’t know: On the mac browsers the mouse wheel event is not sent properly to the flash player.
Others already solved that problem before, SWFWheel made it all more easy for you:
- Download the latest version here.
- Put in the first frame of your .fla or in the main Sprite this line of code
import org.libspark.ui.SWFWheel; SWFWheel.initialize(stage);
- Enter the name AND id to the embed code like:
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf", { id: "myId", name: "myId" }, {}, {} );(SWFObject based)
That’s it!
Can’t get much simpler.
No JavaScript files you need, no special API’s to use. Just use your mouse wheel event like you’re used to and everything works like a charm.
Fabulous work Izukawa sensei! Thanks Spark Project!
Tags: ActionScript 3, libspark, Mouse wheel, Open Source, The Spark Project