1 |
EZIOXtra is available here
|
2 |
Copy the EZIOXtra.X32 file into the Macromedia Director Xtras folder. |
3 |
Use the Modify Movie Xtras to include the EZIOXtra into the movie. |
| 4 |
To initialize the Xtra object - assume you are using COM1,
function startMovie() {
_global.ezio = new xtra("EZIOXtra");
_global.ezio.initSerial(1);
}
function stopMovie() {
delete(_global.ezio);
}
|
| 5 |
To read the status from a sensor in digital in line 1,
function exitFrame() {
var sensor1;
sensor1 = _global.ezio.readLine(1);
}
|
| 6 |
To read the status from an analog input line 1,
function exitFrame() {
var myVal;
myVal = _global.ezio.a2d(1);
if (myVal < 0) {
myVal += 256;
}
}
|
| 7 |
To turn on the relay in digital out line 1,
function mouseUp() {
_global.ezio.writeLine(1,true);
}
|
| 8 |
To change the value for the analog output (PWM) line 1,
function exitFrame() {
var myVal;
myVal = 888;
_global.ezio.PWM(1,myVal);
}
|