The interface is being developed in Adobe Flex Builder 3 which uses mxml and ActionScript for its different components. A few testing applications were available on wiiflash.org which work quite well (now) and I have modified one just to get used to the WiiFlash API and of course Flash. The API has a Wiimote class which contains all the properties of the wiimote such as buttons, accellerometer values in the x, y and z axes, IR readings and so on. It also contains events (as Flash is event based) for the Wiimote such as button press, button release, IR found, IR lost etc.
The entire API is laid out quite nicely here: wiiflash-asdoc
Because the Flash applications which use the WiiFlash server do not work online I can only provide screenshots.
This is my own application. It was originally just a purple cursor moving on a black background according to the IR readings from the wiimote. The sensor bar from the Wii console is placed on top of the monitor as the source of infrared light. I have since changed it so that there is a standard neutral crosshair when moving it on the screen normally and when the B (trigger-like) button is pressed, the sound of a gunshot is heard, the wiimote rumbles briefly and the crosshair gets slightly bigger and red. When the A button is pressed, the crosshair goes green and the sound of a gun reloading is heard.
All this modification and creation of applications has given me quite an understanding of how the event based elements of Flash work and also how the wiimote ActionScript API is arranged.
No comments:
Post a Comment