Overview | Code samples | API | wii.js Source code | Test Page (display in Wii)

API

static functions

wii.isWiiOperaBrowser()
Returns true if the page is displayed in the Wii Opera browser; returns false otherwise.
wii.setupHandlers()
Adds the event handlers to the page that the library needs.
This should probably be added during body.onload().
wii.addController(wii.Controller)
Register the controller to receive input events.
wii.removeController(wii.Controller)
Prevent the controller from receiving input events.

wii.Controller subclasses

wii.Wiimote
This handler responds to traditional Wiimote presses.
wii.KeyboardController
This handler responds to keyboard inputs. This is useful for testing your Wii-friendly web site in a PC web browser.
wii.HorizontalController
This handler responds as if the controller is being held horizontally (with the D-pad on the left) like the traditional NES controller.
In this case, the 1 button corresponds to the B button and the 2 button corresponds to the A button.

wii.Controller methods

wii.handleUp()
This is invoked when the up button is pressed.
wii.handleDown()
This is invoked when the down button is pressed.
wii.handleLeft()
This is invoked when the left button is pressed.
wii.handleRight()
This is invoked when the right button is pressed.
wii.handleA()
This is invoked when the A button is pressed.
wii.handleB()
This is invoked when the B button is pressed.
wii.handle1()
This is invoked when the 1 button is pressed.
wii.handle2()
This is invoked when the 2 button is pressed.
wii.handlePlus()
This is invoked when the plus button is pressed.
wii.handleMinus()
This is invoked when the minus button is pressed.


©2007 Michael Bolin » bolinfest@gmail.com www.bolinfest.com