Skip to content

Posts tagged ‘Creature’

19
Mar

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/'>

Related Posts:

21
Jan

See Creature

Took a day to extend the tentacle class to work on 360° and secondary motion from a parent node, but here it is, the first critter for my ocean. Thanks to Keith Peters book ActionScript 3 Animation, useful formulas section for getting me through this. It kicked my butt and fried my brain, but it’s so clear now. Onwards!

Get Adobe Flash player

Related Posts: