Want to use the Wiimote for your Flash applications? Well a combination of a Server and API developed by Thibault Imbert and Joa Ebert for implementing a Wiimote within flash called Wiiflash is available at the Wiiflash site www.wiiflash-bytearray.org. It‘s been available and developed for a short while but it is only really now that it’s picking up popular recognition.
As part of my final project where I’m designing a game in Flash that makes use of the Wiimote, I decided to test out the Wiimote in flash through downloading the folder from http://wiiflash.bytearray.org/?page_id=50. Once downloaded I set up the API to Flash. There are two ways of doing this. You could follow the setup tutorial by Imbert on the site and implement it through Flex via its Library path to the SWC folder supplied or you could implement it straight into Flash via the source path to the source folder, please see images to below. Once in Flash or Actionscript 3.0 (Wiiflash only runs on Actioncript 3.0) make sure to import the necessary packages.
Next you have to connect the Wii to the Wiiflash server. This is really simple though I set this up for a PC. As the Wiimote is fitted with a Bluetooth connection, you’ll need a Bluetooth adapter set up on your PC. Once you establish connection between your PC and the Wiimote via Bluetooth go into the Wiiflash download and open the server folder and run the server. The server automatically connects to the Wiimote and now you’re up and running.
The Wiiflash download comes with a few examples. In particular the Wiimote demo example shows how responsive the Wiimote is to movement through displaying values based on a respective motion. Including Angular motions such as Yaw, Roll and Pitch and Planar movement made on the different planes. The Papervision demo is quite good. Here they have a model of a rally car which you can play around with. The controls take getting use to as they’re quite erratic at times when moving the car. When you try to move the car slowly just a little way the car hardly responds, however when you move it a bit faster it over responds. I will keep at tinkering with this for now, and I’ll keep you posted for further developments.
Go to Edit>Preferences> Actionscript(under category)> Actionscript 3.0 settings>


No comments:
Post a Comment