iPhone Controlling Flash with TUIO and UDP help
I am in the middle of constructing a FTIR table, I am going with the laser approach after less than satisfactory results using Infra Red LED’s. It’s going well and I have had some success with Fiducial tracking using my infra red modded webcam cam, plexiglass and such. I had been building the apps in Quartz Composer but I am not too familiar with Quartz yet.
Until my lasers arrive I decided to try and get some output from my iPhone, after all it’s a great touch screen and switch to building apps in Flash, which I know better.
How do you get Camera or iPhone touch data out over the network to your MacBook and then have Flash read it??? Long story. If you are interested in going down this rabbit hole, check out these links.
http://reactivision.sourceforge.net/
http://www.tuio.org/?software
Georg Kaindl’s UDP Flash Bridge video
http://bubblebird.at/tuioflash/
http://pixelverse.org/iphone/oscemote/
And for lasers: http://aixiz.globat.com/
As I recently discovered, there are a few different methods of tracking and a bunch of lib’s on google code for such things.
After trying most of them and trying a couple of different table designs, I decided to go with http://gkaindl.com/software/udp-flashlc-bridge for UDP speed and http://bubblebird.at/tuioflash/tuio-as3-library/ for TUIO or Blob tracking in Flash and http://pixelverse.org/iphone/oscemote/ to track iPhone touches.
I find that sending the data over UDP using udp-flashlc-bridge is way faster and more efficient than XML- or TCP-based approaches. There is virtually no lag at all.
I modded my sea creature to work with a simple touch setup. Here is a crappy movie for now. I will do some nicer movies when I finish my table.
height="256" codebase='http://www.apple.com/qtactivex/qtplugin.cab'>
controller="true" loop="true" pluginspage='http://www.apple.com/quicktime/download/'>The next thing was to get some multi touch functionality. This one took some head scratching and it still needs refinement. I started thinking about moving photos around, rotating, scaling and such. I realized I needed special movieClip class I had created for my last commercial Flash project. A movieClip class that can be assigned a dynamic registration point and it’s globalToLocal coords work no matter how deeply nested it lives. This allows for the first finger touch to be set as the registration point for the photo and the next touch to be used as the operator for scaling and rotating. Here is another crappy movie.
height="256" codebase='http://www.apple.com/qtactivex/qtplugin.cab'>
controller="true" loop="true" pluginspage='http://www.apple.com/quicktime/download/'>


Ouch! made me feel like some kind of malicious hacker. Brings up a good point though, one I had not thought of yet. I will have to read this blog and learn more. “Evil laugh”.
It’s all a bit over my head, as far as I know most firewalls that are implemented as perimeter protection in office buildings, etc. usually block UDP.
Hello Dave!
Great work. I trying to pull off something similar. I’m trying to get my iPhone to control a Flash Movie. I have looked into Kaindl’s Upd-Flashlc-bridge. I feel the missing part is how I get the iPhone to send signals to this Upd Flash bridge. You seem to got things working, would you please mind to share or coach me through?
Many thanks in advance! Hope to hear from you soon.
Best regards,
Pei-Yin
Hi there Pei-Yin.
To get it working, head to the App store and get OSCemote
Install it on your iPhone and go to the more->settings and in the To: box, set to your Mac’s ip address. and 3333 in the port box, click connect.
Fire up the Flash UDP bridge and that’s it. If your Flash is setup properly to listen and decode the OSC data through the LocalConnection, things should just work.
It’s magic. Let me know if it works or if you need more detailed instructions.