E.g. The "querymodem" script in the "querymodem" sample, the last line is
Code:
commx.writeStr(command);
You can change it to
Code:
var stream = new StringStream;
stream.write(command);
commx.write(stream);
The "stream" object contains the binary data and is sent by the "write" method.
Similarly, in the "initialize" script, the "onRXChar" event handler is
Code:
var str = this.readStr(count);
FlashPlayer.setVariable("response.text", str);
trace(str);
It can be changed to
Code:
var stream = this.read(count);
FlashPlayer.setVariable("response.text", stream.toString());
trace(stream);
The "read" method returns a stringstream object contains binary data.