The common interface for TUIO is UDP. However it is our understanding that two additional interfaces were introduced for using TUIO with Flash, initially TUIO/FLC followed by TUIO/TCP. The reason was, until recently, that Flash didn't support either TCP or UDP sockets, so TUIO/FLC was created. It uses a communication protocol from Flash called "LocalConnection" to send touch information directly into a Flash applet. Flash did eventually add support for TCP sockets, but apparently they’re not so good for TUIO due to higher latency.
UPDD TUIO Server currently only supports UDP (no TCP or FLC) and we could add support for other interfaces. However, we do not believe this is necessary for two reasons:
There is software that can bridge between them. In particular:
- Bridges TUIO/UDP and TUIO/FLC
- Bridges TUIO/UPD and TUIO/TCP.
This program in fact just takes any data received over UDP and retransmits using TCP, though it was originally written with TUIO in mind.
It is our understanding that Flash TUIO implementation has supported UDP since 2010. So it's already possible "to use Flash directly with all standard TUIO/UDP implementations," assuming you're using a recent enough version of Flash. The TUIO specification mentions that for the next revision the reference implementation they provide will support TUIO/FLC and TUIO/TCP, though, so it would seem there's still value to supporting the other methods, perhaps for older Flash apps.
A customer reported difficulties in getting Adobe Air applications to work with flash and sent a couple of non working example programs.
We did manage to get TUIO working in Flash. The problem was twofold, either trying to receive TUIO touches using UDP, the support of which is still questionable although Adobe AIR it is allegedly supported, or trying to use Flash's LocalConnection interface, which from our research appears to be very troublesome.
What worked was to use the UDP to TCP bridge documented above and then program the Flash app to receive touches through TCP.
We needed to modify a supplied ActionScript (.as file) to connect to port 3000 because, by default, udp-tcp-bridge routes udp packets from port 3333 to port 3000. This can be changed, though.
It should be noted that our initial investigations got this working in Flash's debug environment. It did not work once publishing the flash movie to a standalone swf file. Apparently Flash doesn't allow swf files located in the local file system to open connections to sockets. We didn’t investigate this issue further but it looks like there's ample documentation available on the web on how to get around this issues.
We also found that one of the supplied Air application test example was able to receive pinch gestures from both Apple trackpads and from UPDD Gestures, so there's also that option for Air applications. Again, we don't think it works when running as a Flash movie but we can investigate further if required.