Problem with Arduino + Flash
i'm working on project allow me click button on flash activate led on hardware.
problem: when enter specific frame button located on flash, communication started successfully. however, when went other frame , decided come button frame, there error. serproxy display error message of "failed open comm port - connection refused" . , communication ended.
i'm pretty sure there no problem either arduino coding or serproxy.
is there anyway can enter other frame , come button frame without having communication disconnected?
below coding of flash actionscript 2.
please me problem. kind of urgent.
thank you.
problem: when enter specific frame button located on flash, communication started successfully. however, when went other frame , decided come button frame, there error. serproxy display error message of "failed open comm port - connection refused" . , communication ended.
i'm pretty sure there no problem either arduino coding or serproxy.
is there anyway can enter other frame , come button frame without having communication disconnected?
below coding of flash actionscript 2.
code: [select]
//------------------------------------------------------------------------ basic arduino
import arduino;
var port:number = 5331;// socket port configured use?
// see net_port entries serproxy.cfg
// create custom object flash's xmlsocket
var a:arduino = new arduino(port);
//------------------------------------------------------------------------ listeners
// can trigger custom actions adding listners arduino object. example, can setup your
// actionscript code run setup function when flash connects socket listener
alistener = new object();
alistener.onconnect = function() {
setupboard();
};
// binds custom listeners arduino object (a)
a.addeventlistener("onconnect",alistener);
a.addeventlistener("onreceivedata",alistener);
//------------------------------------------------------------------------ that's all!
function setupboard() {
trace("connection established. setting leds...");
// each physical led gets virtual copy in flash
(var i=2;i<=4;i++) {
// associates pin each movieclip
var mc:movieclip = _root.infos["link"+i];
mc.pin = i.tostring();
var owner = this;
mc.onpress = function() {
owner.a.send(this.pin);
for (var i=2; i<=4; i++) {
_root.infos["link"+i].gotoandstop(1);
}
_root.infos["link"+this.pin].gotoandplay(2);
}
}
}
please me problem. kind of urgent.

thank you.
please.. anyone.. :-/
Arduino Forum > Forum 2005-2010 (read only) > Software > Interfacing > Problem with Arduino + Flash
arduino
Comments
Post a Comment