Folders ======= AS - Actionscript classes Flash - Flash Demo files Flex - Source files for the Flii framework application Haxe - The flii desktop application and resources Neko - Source code to build the neko extension How it works ============ Flii is a desktop application which runs under SWHX. A custom Neko (the VM on which SWHX runs) extension is used to communicate with the wiimote. Messages from the wiimote are passed via SWHX to a FLEX based shell, and from there, made available to your SWF's. Developing with Flii ==================== There are a few different types of user who may want to develop with flii: Those who want to simply access the wiimote from flash. Please see “Basic Use” below Those who want to embed Flii in their own SWHX based application. Please see “Advanced Use” Below. Those who want to modify the neko Extension used to communicate with the wiimote. Please see “Extending Flii” Below Basic Use ========= When developing flash based applications using flii, you are interested in two main directories: AS - Actionscript classes Haxe - The flii desktop application and resources To get started open the Haxe folder and launch the swhx application. You should see the focus demo from paperworld. Now press the red sync button on your wiimote (the one inside the battery compartment) – in a moment you should get a connected message. If not relaunch the application. To develop your own swf, take a look at flash/FliiAppDemo.as This contains the modified focus demo. You will need to make sure the AS folder is in your source path, to compile the demo you will also need to obtain the current version of papervision 3d, and also place in your source path. A few things of note about the demo app: - You must implement iFlii interface. This requires one entry method called startFlii. - To add event listeners use the static method Flii.getInstance() to retrieve a local instance. Event constants are defined in events.FliiEvent For more examples of events please see the mxml files in /flex These contain the code for the FLEX panels used in the shell application. Once you have a swf, place it in the haxe directory and alter the text box to reference your swf. Hit refresh and your swf should load. To output debugging text to the on-screen log, you can call the static function Flii.fliiData(msg:String); Advanced use ============ To integrate flii into your own swhx application: Duplicate the functionality in haxe/app.hx This includes callback functions for the neko extension,and launching a separate thread for the extension. You will also need to duplicate the functions is flex/FliiUI.mxml At present these need to be in the root of your application as revealed to swhx. Extending Flii ============== The neko folder contains an xcode project to compile the neko extension. You will first need to set the final copy stage of the project to your own directory containing the flii.ndll extension, this should be the same directory as the swhx application, currently: /haxe Please note – a much fuller form of documention will be produced once we have added windows support, for now please head over to www.fwiidom.org and sign up for the email list http://osflash.org/mailman/listinfo/flii_osflash.org