muio interface
Flash
You will need to use the muioXMLserver to connect the muio to Flash.
You have a choice of 2 sets of objects and examples.
Basic
These were written in Flash MX and should work in most versions since.
The muio code is held in an external .as file, this neds to be in the same directory as your project.
#include "muio.as"
The muio code sets up a muio object with varible name "muio" and connects to the server (on the default port of 7000). There are 3 methods avalable to you:-
muio.getStatus(); This returns "new", "failed", "connected" or "disconnected" reflecting communication
muio.getInputValue("adc0", 2); Use this to get the latest value for an input (see below)
muio.getDIOpin("port1", 0); Use this to access indivual inputs (e.g. buttons) on a digital IO port
muio getInputValue commands:-
You can choose from... "adc0" or "adc1" then 0, 1, 2 or 3
IF you have extended your muio then ports "adc2"... "adc7" maybe available
Access on board DIO port with
DIO = muio.getInputValue("port1",0);
But remember you then need to test individual bits.
So use e.g.
DIO_pin4 = muio.getDIOpin("port1", 4);
Mapping adc0 etc to handheld/m-Log style interfaces.
adc0, 0 = pot1
adc0, 1 = pot2
adc0, 2 = roll
adc0, 3 = pitch
Advanced CS4
This package sets up muio data as a series of events. It is probably easier to use, but more obscured by code so ironically you need better coding skills.
Flash objects and examples
| Title | Post date | Release Notes | Download |
|---|---|---|---|
| Basic flash object and example v0-1 | 08/10/2009 | A basic Flash object written in FlashMX. Receives from muioXMLServer. Compatible with adc ports and port1 (inc pin access) | |
| Flash objects and examples for CS4 | 08/10/2009 | Advanced examples written with Paul Vickers, objects for basic muio, handheld and boxed muio. Code held in external AS file, stes up Events for Flash objects to receive. Receives form muioXMLserver |