Products/BlueSense Flash MX/Setup
From BlueMelon
This piece of code demonstrates how to setup a basic connection using a Master device and then creating a analog device for unique identifier 888. It all happens in the _root.onLoad handler so that it is created only once. In the onConnect handler the analog device is hooked, since not until then it is possible.
var master; var adc;
_root.onLoad = function() { master = new Master();
master.onConnect = function(success:Boolean) { if(!success) { trace("connection error"); return; }
// start the bluesense network with a 5 ms interval master.start(5);
// hookup a few devices here...
adc = new AdcInputDevice(master, 888);
} }


