Wii Hacks

        

Monday, January 01, 2007

Macromedia Flash code for Wiimote button events

quasimondo, has posted some source code that allows you to register keypress events from the WiiMote in Flash applications inside the Wii Web Browser. He writes:

Now how does this work? Since all direct Javascript to Flash communication is either impossible or too slow I'm using an indirect method: I use the Stage.onResize event of one Flash file as a trigger and communication device. When a keypress is received by the Opera browser I scale the layer which contains a sender swf to a width that is equal to the detected key code. This triggers a resize event inside the sender swf which reads out its new width and sends that number via LocalConnection to the main swf. There it is processed by a Wiimote class which can then be similary used like a Key object.
Flash developers will want to download the source code here, and read quasimondo's site for more info.

Subscribe to the Nintendo Wii Hacks Blog RSS Feed

Also see:
PSP Hacks
PS3 Hacks
Zune Hacks
iPhone Hacks
Apple TV Hacks