WiiFlash allow communication between the Wiimote and Flash apps. The tool consists of two main parts: WiiFlash Server and the WiiFlash ActionScript API. The Wiimote input can be handled using flags (boolean properties indicating the state of the buttons) or using events.


var wiimote: Wiimote = new Wiimote();
wiimote.addEventListener( Event.CONNECT, onWiimoteConnect );

wiimote.addEventListener( ButtonEvent.A_PRESS, onAPress );
wiimote.addEventListener( ButtonEvent.A_RELEASE, onARelease );

private function onAPress( event: ButtonEvent ): void
        wiimote.rumble = true;

private function onARelease( event: ButtonEvent ): void
        wiimote.rumble = false;

private function onEnterFrame( event: Event ): void
        //Rumble while A and B are pressed
        wiimote.rumble = wiimote.a && wiimote.b;
Input . URL.