Tutorial / Using with Flash

Setup

The Flash software library consists of a server software, "gsp (gainer serial proxy)" for communicating with Flash via XMLSocket, and a library written in ActionScript (.as). First, I'll explain how to setup gsp. Then about how to setup security settings for Flash Player.

How to setup gsp on Mac OS X

Double click on "flash/serial_proxy/mac/gsp" to launch the application. When launched, you'll see messages as follows. If no error messages display, it should be fine.

 GAINER serial proxy
 @author PDP Project
 @version 1.0

 undefined serial port. use default setting: /dev/cu.usbserial-A300107K
 starting server...
 starting GAINER...
 server started on port 2000
 GAINER started on port /dev/cu.usbserial-A300107K

By default, gsp is configured to use port number 2000 to communicate with Flash Player. If you want to use an other port number (e.g. port number 5000), please modify "setting.txt" located on the same folder as "gsp," and write as follows:

 5000

Gsp is designed to use a serial port automatically by searching an I/O module connected to the PC. If you want to specify a serial port to use an I/O module when multiple modules are connected, please write as follows in the second line of the setting file.

 5000
 /dev/cu.usbserial-A*******

Finally, please keep open the "gsp" application while you are communicating.

How to setup gsp on Windows XP

First of all, please specify the COM port number for the I/O module. Open the setting file "settings.txt" in "flash/serial_proxy/win/," and modify the COM port number (default is COM3) for the I/O module (e.g. COM4).

 2000
 COM4

Double click on the "gsp.exe" in the same folder. When launched, you'll see messages as follows. If no error messages display, it should be fine.

 GAINER serial proxy
 @author PDP Project
 @version 1.0

 starting GAINER...
 starting server...
 server started on port 2000
 GAINER started on port COM4

By default, gsp is configured to use port number 2000 to communicate with Flash Player. If you want to use another port number (e.g. port number 5000), please modify "setting.txt" located on the same folder as "gsp," and write as follows:

 5000
 COM4

Finally, please keep open the "gsp" application while you are communicating.

Flash Player

Please modify Flash Player's global security setting to allow communicating with local server for example files. Please refer the following tutorial:

Specifying trusted files using the Settings Manager

After finishing these processes, double click on "button.swf" in "fla/examples/basic/". If you configured correctly, you shouldn't see any error messages.

prev 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 next
Print