LeichtgewichtLeichtgewicht

2009/05/20 – 20:58

Libspark: SWFWheel

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:

  1. Download the latest version here.
  2. 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);
  3. 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!

Factsheet

author: nobu (aka. hige/soundkitchen)
category: util
used revision: 1.1
documentation: japanese/english

Tags: , , , ,

Leave a Reply

Twitter Users!
Enter your personal information in the form or sign in with your Twitter account by clicking the button below.

Site informations

Martin Heidegger – Web Developerskype:mastakanedaxing:martin.heideggertwitter:leichtgewicht